pungi: Exclude RPMs that are in lookaside

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Daniel Mach 2016-10-17 12:00:44 +02:00 committed by Lubomír Sedlář
parent 3e7f2dfa9d
commit 2cd2e0e15f

View File

@ -802,15 +802,19 @@ class Pungi(PungiBase):
self.expand_multilib_blacklist() self.expand_multilib_blacklist()
self.all_pkgs = self.excludePackages(self.all_pkgs) self.all_pkgs = self.excludePackages(self.all_pkgs)
lookaside_nvrs = set() lookaside_nvrs = set()
for po in self.all_pkgs: for po in self.all_pkgs:
if po.repoid in self.lookaside_repos: if po.repoid in self.lookaside_repos:
lookaside_nvrs.add(po.nvra) 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: 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.logger.info("Removed %s (repo: %s), because it's also in a lookaside repo"
self.all_pkgs.remove(po) % (po, po.repoid))
self.excluded_packages.add(po)
else:
all_pkgs.append(po)
self.all_pkgs = all_pkgs
self.get_langpacks() self.get_langpacks()