1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-20 09:16:16 +02:00

Fix multibuild packages in osc wipebinaries

This commit is contained in:
Daniel Mach 2022-05-10 10:54:25 +02:00
parent f70b480cab
commit ff1ae5e25e

View File

@ -7407,8 +7407,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
@cmdln.option('-a', '--arch', metavar='ARCH', @cmdln.option('-a', '--arch', metavar='ARCH',
help='Delete all binary packages for a specific architecture') help='Delete all binary packages for a specific architecture')
@cmdln.option('-M', '--multibuild-package', action='append', @cmdln.option('-M', '--multibuild-package', metavar="FLAVOR", action='append',
help='Delete all binary packages for specified multibuild package') help=HELP_MULTIBUILD_MANY)
@cmdln.option('-r', '--repo', metavar='REPO', @cmdln.option('-r', '--repo', metavar='REPO',
help='Delete all binary packages for a specific repository') help='Delete all binary packages for a specific repository')
@cmdln.option('--build-disabled', action='store_true', @cmdln.option('--build-disabled', action='store_true',
@ -7430,9 +7430,9 @@ Please submit there instead, or use --nodevelproject to force direct submission.
usage: usage:
osc wipebinaries OPTS # works in checked out project dir osc wipebinaries OPTS # works in checked out project dir
osc wipebinaries OPTS PROJECT [PACKAGE] osc wipebinaries OPTS PROJECT [PACKAGE[:FLAVOR]]
osc unpublish OPTS # works in checked out project dir osc unpublish OPTS # works in checked out project dir
osc unpublish OPTS PROJECT [PACKAGE] osc unpublish OPTS PROJECT [PACKAGE[:FLAVOR]]
${cmd_option_list} ${cmd_option_list}
""" """
@ -7477,12 +7477,11 @@ Please submit there instead, or use --nodevelproject to force direct submission.
if len(codes) == 0: if len(codes) == 0:
raise oscerr.WrongOptions('No option has been provided. If you want to delete all binaries, use --all option.') raise oscerr.WrongOptions('No option has been provided. If you want to delete all binaries, use --all option.')
packages = []
if opts.multibuild_package: if opts.multibuild_package:
for subpackage in opts.multibuild_package: resolver = MultibuildFlavorResolver(apiurl, project, package, use_local=False)
packages.append(package + ":" + subpackage) packages = resolver.resolve_as_packages(opts.multibuild_package)
else: else:
packages.append(package) packages = [package]
# make a new request for each code= parameter and for each package in packages # make a new request for each code= parameter and for each package in packages
for package in packages: for package in packages: