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