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 <jkaluza@redhat.com>
This commit is contained in:
Jan Kaluza 2017-06-06 13:29:18 +02:00 committed by Lubomír Sedlář
parent 1db1abbb82
commit 3601d6d1a8

View File

@ -46,6 +46,15 @@ class GatherSourceModule(pungi.phases.gather.source.GatherSourceBase):
for a in compatible_arches for a in compatible_arches
], []) ], [])
for rpm_obj in rpms: 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: for mmd in variant.mmds:
mmd_id = "%s-%s" % (mmd.name, mmd.stream) mmd_id = "%s-%s" % (mmd.name, mmd.stream)
# Generate architecture specific modulemd metadata # Generate architecture specific modulemd metadata