Check each package's deps only once.

This commit is contained in:
Daniel Mach 2012-10-15 11:16:54 -04:00 committed by Dennis Gilmore
parent 77dea0ec92
commit 5069eb8b09

View File

@ -142,6 +142,7 @@ class Pungi(pypungi.PungiBase):
self.last_po = 0
self.resolved_deps = {} # list the deps we've already resolved, short circuit.
self.excluded_pkgs = {} # list the packages we've already excluded.
self.seen_pkgs = {} # list the packages we've already seen so we can check all deps only once
def _add_yum_repo(self, name, url, mirrorlist=False, groups=True,
cost=1000, includepkgs=[], excludepkgs=[],
@ -341,6 +342,10 @@ class Pungi(pypungi.PungiBase):
"""Add the dependencies for a given package to the
transaction info"""
if po in self.seen_pkgs:
return
self.seen_pkgs[po] = None
self.logger.info('Checking deps of %s.%s' % (po.name, po.arch))
reqs = po.requires