sanity-check build target before running a chain-build
This commit is contained in:
parent
6f8e9bf4ab
commit
2d052475c2
1 changed files with 8 additions and 0 deletions
8
cli/koji
8
cli/koji
|
|
@ -643,6 +643,14 @@ def handle_chain_build(options, session, args):
|
|||
if dest_tag['locked']:
|
||||
parser.error(_("Destination tag %s is locked" % dest_tag['name']))
|
||||
|
||||
# check that the destination tag is in the inheritance tree of the build tag
|
||||
# otherwise there is no way that a chain-build can work
|
||||
ancestors = session.getFullInheritance(build_target['build_tag'])
|
||||
if dest_tag['id'] not in [ancestor['parent_id'] for ancestor in ancestors]:
|
||||
print _("Packages in destination tag %(dest_tag_name)s are not inherited by build tag %(build_tag_name)s" % build_target)
|
||||
print _("Target %s is not usable for a chain-build" % build_target['name'])
|
||||
return 1
|
||||
|
||||
sources = args[1:]
|
||||
|
||||
srpms = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue