From 01607602c699a79c322627a69669c5bc3874abfe Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Wed, 12 Apr 2017 14:31:40 -0400 Subject: [PATCH] Expand compatible arches when gathering from modules. Fixes #596. Signed-off-by: Ralph Bean --- pungi/phases/gather/sources/source_module.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pungi/phases/gather/sources/source_module.py b/pungi/phases/gather/sources/source_module.py index dd7eaffa..93c71697 100644 --- a/pungi/phases/gather/sources/source_module.py +++ b/pungi/phases/gather/sources/source_module.py @@ -19,7 +19,7 @@ Get a package list based on modulemd metadata loaded in pkgset phase. """ -from pungi.wrappers.comps import CompsWrapper +import pungi.arch import pungi.phases.gather.source import kobo.rpmlib @@ -31,9 +31,13 @@ class GatherSourceModule(pungi.phases.gather.source.GatherSourceBase): groups = set() packages = set() + compatible_arches = pungi.arch.get_compatible_arches(arch) + if variant is not None and variant.modules: - rpms = variant.pkgset.rpms_by_arch[arch] + \ - variant.pkgset.rpms_by_arch["noarch"] + rpms = sum([ + variant.pkgset.rpms_by_arch.get(a, []) + for a in compatible_arches + ], []) for rpm_obj in rpms: for mmd in variant.mmds: srpm = kobo.rpmlib.parse_nvr(rpm_obj.sourcerpm)["name"]