1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-28 02:36:15 +01:00

Merge branch 'checkconstraints' of https://github.com/adrianschroeter/osc

Adds a context-insensitive variant of the checkconstraints command.
This commit is contained in:
Marcus Huewe 2018-10-05 13:08:00 +02:00
commit 5572e4c3c1

View File

@ -5828,6 +5828,9 @@ Please submit there instead, or use --nodevelproject to force direct submission.
Checks the constraints for compliant workers.
usage:
remote request:
osc checkconstraints [OPTS] PROJECT PACKAGE REPOSITORY ARCH
in a package working copy:
osc checkconstraints [OPTS] REPOSITORY ARCH CONSTRAINTSFILE
osc checkconstraints [OPTS] CONSTRAINTSFILE
@ -5836,8 +5839,18 @@ Please submit there instead, or use --nodevelproject to force direct submission.
${cmd_option_list}
"""
repository = arch = constraintsfile = None
project = store_read_project('.')
package = store_read_package('.')
args = slash_split(args)
if len(args) == 4:
project = args[0]
package = args[1]
repository = args[2]
arch = args[3]
opts.ignore_file = True
else:
project = store_read_project('.')
package = store_read_package('.')
if len(args) == 1:
constraintsfile = args[0]
elif len(args) == 2 or len(args) == 3: