From 3601d6d1a8b4b3e607e4a7bd8767f67a584fd3ff Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Tue, 6 Jun 2017 13:29:18 +0200 Subject: [PATCH] gather-source: Check arch in module source Skip the RPM if it is excluded on this arch or exclusive for different arch. Signed-off-by: Jan Kaluza --- pungi/phases/gather/sources/source_module.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pungi/phases/gather/sources/source_module.py b/pungi/phases/gather/sources/source_module.py index e38bb391..41510ee8 100644 --- a/pungi/phases/gather/sources/source_module.py +++ b/pungi/phases/gather/sources/source_module.py @@ -46,6 +46,15 @@ class GatherSourceModule(pungi.phases.gather.source.GatherSourceBase): for a in compatible_arches ], []) for rpm_obj in rpms: + # Skip the RPM if it is excluded on this arch or exclusive + # for different arch. + if (rpm_obj.excludearch and + set(rpm_obj.excludearch) & set(compatible_arches)): + continue + if (rpm_obj.exclusivearch and not + (set(rpm_obj.exclusivearch) & set(compatible_arches))): + continue + for mmd in variant.mmds: mmd_id = "%s-%s" % (mmd.name, mmd.stream) # Generate architecture specific modulemd metadata