Minor speedup to short circuit depsolving
This commit is contained in:
parent
1e7940b760
commit
5749bcd8da
@ -43,6 +43,7 @@ class Gather(yum.YumBase):
|
||||
self.pkglist = pkglist
|
||||
self.polist = []
|
||||
self.srpmlist = []
|
||||
self.resolved_deps = {} # list the deps we've already resolved, short circuit.
|
||||
|
||||
def _provideToPkg(self, req): #this is stolen from Anaconda
|
||||
bestlist = None
|
||||
@ -79,6 +80,8 @@ class Gather(yum.YumBase):
|
||||
pkgresults = {}
|
||||
|
||||
for req in reqs:
|
||||
if self.resolved_deps.has_key(req):
|
||||
continue
|
||||
(r,f,v) = req
|
||||
if r.startswith('rpmlib(') or r.startswith('config('):
|
||||
continue
|
||||
@ -95,6 +98,8 @@ class Gather(yum.YumBase):
|
||||
pkgresults[dep] = None
|
||||
self.tsInfo.addInstall(dep)
|
||||
|
||||
self.resolved_deps[req] = None
|
||||
|
||||
return pkgresults.keys()
|
||||
|
||||
def getPackageObjects(self):
|
||||
|
Loading…
Reference in New Issue
Block a user