From 2cd2e0e15f395ae5ac00bdd61d2db9decfbb2670 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Mon, 17 Oct 2016 12:00:44 +0200 Subject: [PATCH] pungi: Exclude RPMs that are in lookaside MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lubomír Sedlář --- pungi/gather.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pungi/gather.py b/pungi/gather.py index fe67ba99..98a2e5c0 100644 --- a/pungi/gather.py +++ b/pungi/gather.py @@ -802,15 +802,19 @@ class Pungi(PungiBase): self.expand_multilib_blacklist() self.all_pkgs = self.excludePackages(self.all_pkgs) - lookaside_nvrs = set() for po in self.all_pkgs: if po.repoid in self.lookaside_repos: lookaside_nvrs.add(po.nvra) - for po in self.all_pkgs[:]: + all_pkgs = [] # building a new list is cheaper than deleting from existing + for po in sorted(self.all_pkgs): if po.repoid not in self.lookaside_repos and po.nvra in lookaside_nvrs: - self.logger.debug("Removed %s (repo: %s), because it's also in a lookaside repo" % (po, po.repoid)) - self.all_pkgs.remove(po) + self.logger.info("Removed %s (repo: %s), because it's also in a lookaside repo" + % (po, po.repoid)) + self.excluded_packages.add(po) + else: + all_pkgs.append(po) + self.all_pkgs = all_pkgs self.get_langpacks()