gather: Better detection of debuginfo in lookaside

If the depsolver wants to include a package that is present in both the
source repo and a lookaside repo, it reliably detects binary packages
present in lookaside, but for debuginfo it's not so reliable.

There is a separate package object for each package in each repo.
Depending on which one is used, debuginfo could be included in the
result or not. This patch fixes that by actually looking if the same
package is present in any lookaside repo.

JIRA: RHELCMP-9373
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
(cherry picked from commit a4476f2570)
This commit is contained in:
Lubomír Sedlář 2023-02-27 15:31:22 +01:00 committed by Stepan Oksanichenko
parent 4637fd6697
commit 9c4d3d496d
Signed by: soksanichenko
GPG Key ID: AB9983172AB1E45B
1 changed files with 1 additions and 2 deletions

View File

@ -783,7 +783,6 @@ class Gather(GatherBase):
continue
debug_pkgs = []
pkg_in_lookaside = pkg.repoid in self.opts.lookaside_repos
for i in candidates:
if pkg.arch != i.arch:
continue
@ -791,7 +790,7 @@ class Gather(GatherBase):
# If it's not debugsource package or does not match name of
# the package, we don't want it in.
continue
if i.repoid in self.opts.lookaside_repos or pkg_in_lookaside:
if self.is_from_lookaside(i):
self._set_flag(i, PkgFlag.lookaside)
if i not in self.result_debug_packages:
added.add(i)