From f4c3d2423dfb33cfea7eb7461c162cb4a94bef89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Tue, 7 Nov 2017 14:06:44 +0100 Subject: [PATCH] pkgset: Always use global tag if specified MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ář --- pungi/phases/pkgset/sources/source_koji.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pungi/phases/pkgset/sources/source_koji.py b/pungi/phases/pkgset/sources/source_koji.py index 1f5f0337..f4d5200a 100644 --- a/pungi/phases/pkgset/sources/source_koji.py +++ b/pungi/phases/pkgset/sources/source_koji.py @@ -258,10 +258,16 @@ def populate_global_pkgset(compose, koji_wrapper, path_prefix, event_id): if not variant_tags[variant]: variant_tags[variant].extend(force_list(compose.conf["pkgset_koji_tag"])) - # In case we have no compose tag from module, use the default - # one from config. - if not compose_tags: - compose_tags.extend(force_list(compose.conf["pkgset_koji_tag"])) + # Add global tag if supplied. + if 'pkgset_koji_tag' in compose.conf: + if compose.conf["pkgset_koji_tag"] == "not-used": + # 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"] global_pkgset_path = os.path.join(