pkgset: Always use global tag if specified

Use global koji tag for populating package set even for modular
composes. To preserve backwards compatibility value "not-used" is
ignored. This should however be fixed in the configuration to simply not
specify the option at all.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2017-11-07 14:06:44 +01:00
parent 03293c725b
commit f4c3d2423d

View File

@ -258,10 +258,16 @@ def populate_global_pkgset(compose, koji_wrapper, path_prefix, event_id):
if not variant_tags[variant]: if not variant_tags[variant]:
variant_tags[variant].extend(force_list(compose.conf["pkgset_koji_tag"])) variant_tags[variant].extend(force_list(compose.conf["pkgset_koji_tag"]))
# In case we have no compose tag from module, use the default # Add global tag if supplied.
# one from config. if 'pkgset_koji_tag' in compose.conf:
if not compose_tags: if compose.conf["pkgset_koji_tag"] == "not-used":
compose_tags.extend(force_list(compose.conf["pkgset_koji_tag"])) # The magic value is used for modular composes to avoid errors
# about missing option. It should be removed in next version.
compose.log_warning('pkgset_koji_tag is set to "not-used", but the '
'option is no longer required. Remove it from '
'the configuration.')
else:
compose_tags.extend(force_list(compose.conf["pkgset_koji_tag"]))
inherit = compose.conf["pkgset_koji_inherit"] inherit = compose.conf["pkgset_koji_inherit"]
global_pkgset_path = os.path.join( global_pkgset_path = os.path.join(