--- portage.py 2003-08-16 03:28:52.000000000 -0400 +++ portage.py 2003-08-20 00:15:51.000000000 -0400 @@ -3365,17 +3365,24 @@ auxdbkeys=['DEPEND','RDEPEND','SLOT','SRC_URI','RESTRICT','HOMEPAGE','LICENSE','DESCRIPTION','KEYWORDS','INHERITED','IUSE','CDEPEND','PDEPEND'] auxdbkeylen=len(auxdbkeys) +dbdir="/var/db/" class portdbapi(dbapi): "this tree will scan a portage directory located at root (passed to init)" def __init__(self): self.root=settings["PORTDIR"] - self.auxcache={} + try: + self.auxcache=cPickle.load(file(dbdir+"auxcache.dict")) + except: + self.auxcache={} #if the portdbapi is "frozen", then we assume that we can cache everything (that no updates to it are happening) self.xcache={} self.frozen=0 #overlays="overlay roots" self.overlays=[] - + + def savecache(self): + cPickle.dump(self.auxcache, file(dbdir+"auxcache.dict", "w"), 1) + def finddigest(self,mycpv): try: mydig = self.findname2(mycpv)[0] --- emerge 2003-08-16 03:28:22.000000000 -0400 +++ emerge 2003-08-20 00:06:22.000000000 -0400 @@ -1551,6 +1551,7 @@ def post_emerge(retval=0): + portage.portdb.savecache() auxpat=re.compile('^([^-]*)(-\d+)?\.info(-\d+)?(\.gz)?') os.chdir("/") global myopts