in buildtag policy test, use br data even if build not set
This commit is contained in:
parent
cf54a7ce3a
commit
9b315ded52
1 changed files with 8 additions and 10 deletions
|
|
@ -7986,16 +7986,14 @@ def policy_get_build_tags(data):
|
|||
return [get_tag(data['build_tag'], strict=True)['name']]
|
||||
elif 'build_tags' in data:
|
||||
return [get_tag(t, strict=True)['name'] for t in data['build_tags']]
|
||||
elif 'build' in data:
|
||||
tags = set()
|
||||
for br_id in policy_get_brs(data):
|
||||
if br_id is None:
|
||||
tags.add(None)
|
||||
else:
|
||||
tags.add(get_buildroot(br_id, strict=True)['tag_name'])
|
||||
return tags
|
||||
else:
|
||||
return []
|
||||
# otherise look at buildroots
|
||||
tags = set()
|
||||
for br_id in policy_get_brs(data):
|
||||
if br_id is None:
|
||||
tags.add(None)
|
||||
else:
|
||||
tags.add(get_buildroot(br_id, strict=True)['tag_name'])
|
||||
return tags
|
||||
|
||||
|
||||
class NewPackageTest(koji.policy.BaseSimpleTest):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue