From c07a4d64a159a994cded4f722b894d5b612a978b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Wed, 18 Apr 2018 14:12:40 +0200 Subject: [PATCH] gather: Stop pulling debuginfo and source for lookaside packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If a package is in lookaside, we don't really need a debuginfo nor source for it. Definitely we should not pull them from the package set even if there is some suitable package. Therefore we should include them in the output but marked as lookaside. Fixes: https://pagure.io/pungi/issue/915 Signed-off-by: Lubomír Sedlář --- pungi/gather_dnf.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pungi/gather_dnf.py b/pungi/gather_dnf.py index 50bb59b6..328d69c8 100644 --- a/pungi/gather_dnf.py +++ b/pungi/gather_dnf.py @@ -608,7 +608,8 @@ class Gather(GatherBase): if not source_pkg: continue - if source_pkg.repoid in self.opts.lookaside_repos: + if (source_pkg.repoid in self.opts.lookaside_repos + or pkg.repoid in self.opts.lookaside_repos): self._set_flag(source_pkg, PkgFlag.lookaside) if source_pkg not in self.result_source_packages: added.add(source_pkg) @@ -641,6 +642,7 @@ class Gather(GatherBase): continue debug_pkgs = [] + pkg_in_lookaside = pkg.repoid in self.opts.lookaside_repos for i in candidates: if pkg.arch == 'noarch' and i.arch != 'noarch': # If the package is noarch, we will only pull debuginfo if @@ -648,7 +650,7 @@ class Gather(GatherBase): # means we don't for example pull debuginfo just because of # -doc subpackage. continue - if i.repoid in self.opts.lookaside_repos: + if i.repoid in self.opts.lookaside_repos or pkg_in_lookaside: self._set_flag(i, PkgFlag.lookaside) if i not in self.result_debug_packages: added.add(i)