From 5f6ee61c7035e5c5b91ed2b3ad5a996e05194577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Wed, 5 Sep 2018 16:04:40 +0200 Subject: [PATCH] gather: Fix multilib query for hybrid solver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The multilib library expects us to ask about the candidate package for another arch (should I include this as multilib?) and not the current arch (should I include other arches for this package?). Signed-off-by: Lubomír Sedlář --- pungi/phases/gather/methods/method_hybrid.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pungi/phases/gather/methods/method_hybrid.py b/pungi/phases/gather/methods/method_hybrid.py index 9dbe4ded..e3f836c6 100644 --- a/pungi/phases/gather/methods/method_hybrid.py +++ b/pungi/phases/gather/methods/method_hybrid.py @@ -241,15 +241,16 @@ class GatherMethodHybrid(pungi.phases.gather.method.GatherMethodBase): continue nevr = kobo.rpmlib.parse_nvr(nvr) - nevr_copy = nevr.copy() - nevr_copy["arch"] = pkg_arch - if self.multilib.is_multilib(self._get_package("%s.%s" % (nvr, pkg_arch))): - for add_arch in self.valid_arches: - if add_arch == arch: - continue - if _nevra(arch=add_arch, **nevr) in self._get_pkg_map(arch): - added.add((nevr["name"], add_arch)) + for add_arch in self.valid_arches: + if add_arch == arch: + continue + try: + multilib_candidate = self._get_package("%s.%s" % (nvr, add_arch)) + except KeyError: + continue + if self.multilib.is_multilib(multilib_candidate): + added.add((nevr["name"], add_arch)) # Remove packages that are already present for nvr, pkg_arch, flags in nvrs: