From 295a60a70436eb56ba429edfbc4710514415d566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Mon, 9 Nov 2020 09:17:48 +0100 Subject: [PATCH] gather: Fix test for module presence MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When testing if a variant has some modules, it's no longer enough to look at `variant.modules`. That attribute contains only names of modules configured in variants.xml. With modules being specified in `pkgset_koji_module_builds` or `pkgset_scratch_modules` options it is possible the code wouldn't trigger even if there was a module. JIRA: RHELCMP-3054 Signed-off-by: Lubomír Sedlář --- pungi/phases/gather/sources/source_module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pungi/phases/gather/sources/source_module.py b/pungi/phases/gather/sources/source_module.py index b2ef7adc..beb108d2 100644 --- a/pungi/phases/gather/sources/source_module.py +++ b/pungi/phases/gather/sources/source_module.py @@ -32,8 +32,8 @@ class GatherSourceModule(pungi.phases.gather.source.GatherSourceBase): groups = set() packages = set() - # Check if this variant contains some modules - if variant is None or variant.modules is None: + # Check if there is a variant. The method only makes sense for variants. + if variant is None: return packages, groups compatible_arches = pungi.arch.get_compatible_arches(arch, multilib=True)