mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-14 09:36:21 +01:00
Merge branch 'fix_help_depends_on' of https://github.com/lethliel/osc
Split dependson and whatdependson into two commands. This way, both commands are part of "osc --help".
This commit is contained in:
commit
6b5b0fd55d
@ -5764,16 +5764,15 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
|
||||
# FIXME: the new osc syntax should allow to specify multiple packages
|
||||
# FIXME: the command should optionally use buildinfo data to show all dependencies
|
||||
@cmdln.alias('whatdependson')
|
||||
def do_dependson(self, subcmd, opts, *args):
|
||||
"""${cmd_name}: Show the build dependencies
|
||||
"""${cmd_name}: dependson shows the build dependencies inside of a project, valid for a
|
||||
given repository and architecture.
|
||||
|
||||
The command can be used to find build dependencies (wrt. a given repository and arch)
|
||||
that reside in the same project. To see all build dependencies use the buildinfo command.
|
||||
|
||||
The command dependson and whatdependson can be used to find out what
|
||||
will be triggered when a certain package changes.
|
||||
This is no guarantee, since the new build might have changed dependencies.
|
||||
|
||||
dependson shows the build dependencies inside of a project, valid for a
|
||||
given repository and architecture.
|
||||
NOTE: to see all binary packages, which can trigger a build you need to
|
||||
refer the buildinfo, since this command shows only the dependencies
|
||||
inside of a project.
|
||||
@ -5783,17 +5782,42 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
|
||||
usage in package or project directory:
|
||||
osc dependson REPOSITORY ARCH
|
||||
osc whatdependson REPOSITORY ARCH
|
||||
|
||||
usage:
|
||||
osc dependson PROJECT [PACKAGE] REPOSITORY ARCH
|
||||
|
||||
${cmd_option_list}
|
||||
"""
|
||||
self._dependson(False, *args)
|
||||
|
||||
|
||||
def do_whatdependson(self, subcmd, opts, *args):
|
||||
"""${cmd_name}: Show the packages that require the specified package during the
|
||||
build.
|
||||
|
||||
The command whatdependson can be used to find out what will be triggered when
|
||||
a certain package changes.
|
||||
|
||||
This is no guarantee, since the new build might have changed dependencies.
|
||||
|
||||
The arguments REPOSITORY and ARCH can be taken from the first two columns
|
||||
of the 'osc repos' output.
|
||||
|
||||
usage in package or project directory:
|
||||
osc whatdependson REPOSITORY ARCH
|
||||
|
||||
usage:
|
||||
osc whatdependson PROJECT [PACKAGE] REPOSITORY ARCH
|
||||
|
||||
${cmd_option_list}
|
||||
"""
|
||||
self._dependson(True, *args)
|
||||
|
||||
|
||||
def _dependson(self, reverse, *args):
|
||||
wd = os.curdir
|
||||
args = slash_split(args)
|
||||
project = packages = repository = arch = reverse = None
|
||||
project = packages = repository = arch = None
|
||||
|
||||
if len(args) < 2 and (is_package_dir('.') or is_project_dir('.')):
|
||||
self.print_repos()
|
||||
@ -5823,9 +5847,6 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
repository = args[2]
|
||||
arch = args[3]
|
||||
|
||||
if subcmd == 'whatdependson':
|
||||
reverse = 1
|
||||
|
||||
xml = get_dependson(apiurl, project, repository, arch, packages, reverse)
|
||||
|
||||
root = ET.fromstring(xml)
|
||||
|
Loading…
Reference in New Issue
Block a user