From: Zac Medico Date: Thu, 12 May 2011 19:02:27 +0000 (-0700) Subject: porttree: use pure volatile cache if necessary X-Git-Tag: v2.1.9.49~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=161437273b668f4b276f9669aae89ef99213d40d;p=portage.git porttree: use pure volatile cache if necessary --- diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index 231d1fb06..429f8cfa2 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -286,12 +286,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: