diff --git a/pungi/phases/pkgset/pkgsets.py b/pungi/phases/pkgset/pkgsets.py index 028cfddb..ca4f7fc6 100644 --- a/pungi/phases/pkgset/pkgsets.py +++ b/pungi/phases/pkgset/pkgsets.py @@ -417,8 +417,8 @@ class KojiPackageSet(PackageSetBase): :param event: the Koji event to query at (or latest if not given) :param inherit: whether to enable tag inheritance :param logfile: path to file where package source tags should be logged - :param include_packages: an iterable of package names that should be - included, all others are skipped. + :param include_packages: an iterable of tuples (package name, arch) that should + be included, all others are skipped. """ result_rpms = [] result_srpms = [] @@ -454,7 +454,11 @@ class KojiPackageSet(PackageSetBase): skipped_arches.append(rpm_info["arch"]) continue - if include_packages and rpm_info["name"] not in include_packages and rpm_info["arch"] != "src": + if ( + include_packages + and (rpm_info["name"], rpm_info["arch"]) not in include_packages + and rpm_info["arch"] != "src" + ): self.log_debug( "Skipping %(name)s-%(version)s-%(release)s.%(arch)s" % rpm_info ) diff --git a/pungi/phases/pkgset/sources/source_koji.py b/pungi/phases/pkgset/sources/source_koji.py index 2e305397..6f9a6432 100644 --- a/pungi/phases/pkgset/sources/source_koji.py +++ b/pungi/phases/pkgset/sources/source_koji.py @@ -21,6 +21,7 @@ import re from itertools import groupby import threading +from kobo.rpmlib import parse_nvra from kobo.shortcuts import force_list, relative_path import pungi.wrappers.kojiwrapper @@ -638,10 +639,9 @@ def populate_global_pkgset(compose, koji_wrapper, path_prefix, event): for arch_modules in variant.arch_mmds.values(): arch_mmd = arch_modules[nsvc] if arch_mmd: - modular_packages.update( - nevra.rsplit("-", 2)[0] - for nevra in arch_mmd.get_rpm_artifacts().get() - ) + for rpm_nevra in arch_mmd.get_rpm_artifacts().get(): + nevra = parse_nvra(rpm_nevra) + modular_packages.add((nevra["name"], nevra["arch"])) pkgset.populate( compose_tag,