Lines 29-34
try:
Link Here
|
29 |
from time import sleep |
29 |
from time import sleep |
30 |
from random import shuffle |
30 |
from random import shuffle |
31 |
from cache.cache_errors import CacheError |
31 |
from cache.cache_errors import CacheError |
|
|
32 |
from cache.util import is_cache_valid |
32 |
except SystemExit, e: |
33 |
except SystemExit, e: |
33 |
raise |
34 |
raise |
34 |
except Exception, e: |
35 |
except Exception, e: |
Lines 4721-4727
class portdbapi(dbapi):
Link Here
|
4721 |
for x in self.porttrees: |
4722 |
for x in self.porttrees: |
4722 |
# location, label, auxdbkeys |
4723 |
# location, label, auxdbkeys |
4723 |
self.auxdb[x] = self.auxdbmodule(portage_const.DEPCACHE_PATH, x, filtered_auxdbkeys, gid=portage_gid) |
4724 |
self.auxdb[x] = self.auxdbmodule(portage_const.DEPCACHE_PATH, x, filtered_auxdbkeys, gid=portage_gid) |
4724 |
|
4725 |
|
|
|
4726 |
if "metadb" in self.mysettings.features: |
4727 |
for x in self.porttrees: |
4728 |
if os.path.exists(x+"/metadata/cache"): |
4729 |
self.metadb[x]=self.metadbmodule(x, "metadata/cache", auxdbkeys) |
4730 |
|
4725 |
def close_caches(self): |
4731 |
def close_caches(self): |
4726 |
for x in self.auxdb.keys(): |
4732 |
for x in self.auxdb.keys(): |
4727 |
self.auxdb[x].sync() |
4733 |
self.auxdb[x].sync() |
Lines 4825-4838
class portdbapi(dbapi):
Link Here
|
4825 |
raise KeyError |
4831 |
raise KeyError |
4826 |
|
4832 |
|
4827 |
try: |
4833 |
try: |
4828 |
mydata = self.auxdb[mylocation][mycpv] |
4834 |
mydata=None |
4829 |
if emtime != long(mydata.get("_mtime_", 0)): |
4835 |
doregen=False |
4830 |
doregen = True |
4836 |
if self.metadb.has_key(mylocation): |
4831 |
elif len(mydata.get("_eclasses_", [])) > 0: |
4837 |
try: |
4832 |
doregen = not self.eclassdb.is_eclass_data_valid(mydata["_eclasses_"]) |
4838 |
mydata = self.metadb[mylocation][mycpv] |
4833 |
else: |
4839 |
except (KeyError, CacheError): |
4834 |
doregen = False |
4840 |
pass |
4835 |
|
4841 |
if not mydata or not is_cache_valid(emtime, self.eclassdb.eclasses, mydata): |
|
|
4842 |
mydata = self.auxdb[mylocation][mycpv] |
4843 |
doregen = not is_cache_valid(emtime, self.eclassdb.eclasses, mydata) |
4836 |
except KeyError: |
4844 |
except KeyError: |
4837 |
doregen = True |
4845 |
doregen = True |
4838 |
except CacheError: |
4846 |
except CacheError: |