summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/dbapi/porttree.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index 379cc68cd..a30c9d7b4 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -170,12 +170,18 @@ class portdbapi(dbapi):
# to the cache entries/directories.
if secpass < 1 or not depcachedir_w_ok:
for x in self.porttrees:
- db_ro = self.auxdbmodule(self.depcachedir, x,
- filtered_auxdbkeys, gid=portage_gid, readonly=True)
- self.auxdb[x] = metadata_overlay.database(
- self.depcachedir, x, filtered_auxdbkeys,
- gid=portage_gid, db_rw=volatile.database,
- db_ro=db_ro)
+ try:
+ db_ro = self.auxdbmodule(self.depcachedir, x,
+ filtered_auxdbkeys, readonly=True, **cache_kwargs)
+ except CacheError:
+ self.auxdb[x] = volatile.database(
+ self.depcachedir, x, filtered_auxdbkeys,
+ **cache_kwargs)
+ else:
+ self.auxdb[x] = metadata_overlay.database(
+ self.depcachedir, x, filtered_auxdbkeys,
+ db_rw=volatile.database, db_ro=db_ro,
+ **cache_kwargs)
else:
for x in self.porttrees:
if x in self.auxdb: