gather: Fix multilib query for hybrid solver

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ář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2018-09-05 16:04:40 +02:00
parent a53dc6f1bb
commit 5f6ee61c70
1 changed files with 9 additions and 8 deletions

View File

@ -241,15 +241,16 @@ class GatherMethodHybrid(pungi.phases.gather.method.GatherMethodBase):
continue continue
nevr = kobo.rpmlib.parse_nvr(nvr) 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:
for add_arch in self.valid_arches: if add_arch == arch:
if add_arch == arch: continue
continue try:
if _nevra(arch=add_arch, **nevr) in self._get_pkg_map(arch): multilib_candidate = self._get_package("%s.%s" % (nvr, add_arch))
added.add((nevr["name"], add_arch)) except KeyError:
continue
if self.multilib.is_multilib(multilib_candidate):
added.add((nevr["name"], add_arch))
# Remove packages that are already present # Remove packages that are already present
for nvr, pkg_arch, flags in nvrs: for nvr, pkg_arch, flags in nvrs: