From 5b5069175d7f1dc1f613a958108f575f1f7a8211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Mon, 22 Feb 2021 10:21:56 +0100 Subject: [PATCH] pkgset: Store module tag only if module is used MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a module is skipped from the compose, we should not add it to a mapping of module tags. If it's there, we then spend time building a repo for the module, and it get's passed to buildinstall, despite the packages not being supposed to be included in the compose. If the packages are not included in any variant, they shouldn't be available to buildinstall either. Signed-off-by: Lubomír Sedlář --- pungi/phases/pkgset/sources/source_koji.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pungi/phases/pkgset/sources/source_koji.py b/pungi/phases/pkgset/sources/source_koji.py index bb574064..f683b4ae 100644 --- a/pungi/phases/pkgset/sources/source_koji.py +++ b/pungi/phases/pkgset/sources/source_koji.py @@ -615,14 +615,6 @@ def _get_modules_from_koji_tags( for build in latest_builds: # Get the Build from Koji to get modulemd and module_tag. build = koji_proxy.getBuild(build["build_id"]) - module_tag = ( - build.get("extra", {}) - .get("typeinfo", {}) - .get("module", {}) - .get("content_koji_tag", "") - ) - - variant_tags[variant].append(module_tag) nsvc = _add_module_to_variant( koji_wrapper, @@ -635,6 +627,14 @@ def _get_modules_from_koji_tags( if not nsvc: continue + module_tag = ( + build.get("extra", {}) + .get("typeinfo", {}) + .get("module", {}) + .get("content_koji_tag", "") + ) + variant_tags[variant].append(module_tag) + tag_to_mmd.setdefault(module_tag, {}) for arch in variant.arch_mmds: try: