1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-14 06:17:18 +01:00

Merge pull request #1517 from andreas-schwab/master

[what]dependson: add --multibuild-package
This commit is contained in:
Daniel Mach 2024-03-13 13:18:12 +01:00 committed by GitHub
commit 00723a1e74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6545,6 +6545,8 @@ 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.option('-M', '--multibuild-package', metavar='FLAVOR',
help=HELP_MULTIBUILD_ONE)
def do_dependson(self, subcmd, opts, *args):
"""
Dependson shows the build dependencies inside of a project, valid for a given repository and architecture
@ -6565,10 +6567,12 @@ Please submit there instead, or use --nodevelproject to force direct submission.
osc dependson REPOSITORY ARCH
usage:
osc dependson PROJECT [PACKAGE] REPOSITORY ARCH
osc dependson PROJECT [PACKAGE[:FLAVOR]] REPOSITORY ARCH
"""
self._dependson(False, *args)
self._dependson(False, opts, *args)
@cmdln.option('-M', '--multibuild-package', metavar='FLAVOR',
help=HELP_MULTIBUILD_ONE)
def do_whatdependson(self, subcmd, opts, *args):
"""
Show the packages that require the specified package during the build
@ -6587,11 +6591,11 @@ Please submit there instead, or use --nodevelproject to force direct submission.
osc whatdependson REPOSITORY ARCH
usage:
osc whatdependson PROJECT [PACKAGE] REPOSITORY ARCH
osc whatdependson PROJECT [PACKAGE[:FLAVOR]] REPOSITORY ARCH
"""
self._dependson(True, *args)
self._dependson(True, opts, *args)
def _dependson(self, reverse, *args):
def _dependson(self, reverse, opts, *args):
wd = Path.cwd()
args = slash_split(args)
project = packages = repository = arch = None
@ -6624,6 +6628,9 @@ Please submit there instead, or use --nodevelproject to force direct submission.
repository = args[2]
arch = args[3]
if packages is not None and opts.multibuild_package:
packages = [packages[0] + ":" + opts.multibuild_package]
project_packages = meta_get_packagelist(apiurl, project, deleted=False, expand=False)
xml = get_dependson(apiurl, project, repository, arch, packages, reverse)