Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checkconstraints: add -M/--multibuild-package #1400

Merged
merged 1 commit into from
Sep 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions osc/commandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -6748,6 +6748,8 @@

@cmdln.option('', '--ignore-file', action='store_true',
help='ignore _constraints file and only check project constraints')
@cmdln.option('-M', '--multibuild-package', metavar='FLAVOR',
help=HELP_MULTIBUILD_ONE)
def do_checkconstraints(self, subcmd, opts, *args):
"""
Check the constraints and view compliant workers
Expand All @@ -6766,21 +6768,24 @@
repository = arch = constraintsfile = None
args = slash_split(args)

if len(args) > 5:
raise oscerr.WrongArgs('Too many arguments')

Check warning on line 6772 in osc/commandline.py

View check run for this annotation

Codecov / codecov/patch

osc/commandline.py#L6771-L6772

Added lines #L6771 - L6772 were not covered by tests

if len(args) == 4 or len(args) == 5:

Check warning on line 6774 in osc/commandline.py

View check run for this annotation

Codecov / codecov/patch

osc/commandline.py#L6774

Added line #L6774 was not covered by tests
project = self._process_project_name(args[0])
package = args[1]
repository = args[2]
arch = args[3]
opts.ignore_file = True
if len(args) == 5:
constraintsfile = args[4];

Check warning on line 6781 in osc/commandline.py

View check run for this annotation

Codecov / codecov/patch

osc/commandline.py#L6780-L6781

Added lines #L6780 - L6781 were not covered by tests
else:
project = store_read_project('.')
package = store_read_package('.')

if opts.multibuild_package:
package = package + ":" + opts.multibuild_package

Check warning on line 6787 in osc/commandline.py

View check run for this annotation

Codecov / codecov/patch

osc/commandline.py#L6786-L6787

Added lines #L6786 - L6787 were not covered by tests

if len(args) == 1:
constraintsfile = args[0]
elif len(args) == 2 or len(args) == 3:
Expand Down
Loading