Remove packages which are in lookaside repos from regular repos.

This makes depsolving more deterministic and keeps resolved package set minimal.
Daniel Mach 2013-03-25 06:22:37 -04:00
parent 5dc0913ef1
commit 663ea07c08
1 changed files with 13 additions and 1 deletions

View File

@ -619,7 +619,19 @@ class Pungi(pypungi.PungiBase):
excludeGroups = [] # A list of groups for removal defined in the ks file
# precompute pkgs and pkg_refs to speed things up
self.all_pkgs = self.ayum.pkgSack.returnPackages()
self.all_pkgs = list(set(self.ayum.pkgSack.returnPackages()))
self.all_pkgs = self.excludePackages(self.all_pkgs)
lookaside_nvrs = set()
for po in self.all_pkgs:
if po.repoid in self.lookaside_repos:
for po in 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.pkg_refs = yum.packages.buildPkgRefDict(self.all_pkgs, casematch=True)