summaryrefslogtreecommitdiffstats
path: root/pym/portage/dbapi/virtual.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-12-28 18:20:29 +0000
committerZac Medico <zmedico@gentoo.org>2007-12-28 18:20:29 +0000
commit7df38f87fddbcf7c9ac23e2da801c4c75bf3c6ff (patch)
tree0f145135e940dacc98bfd212c6215f1e1935e098 /pym/portage/dbapi/virtual.py
parent7d4568d88aa55ec458ae6057fc6347785e6630ed (diff)
downloadportage-7df38f87fddbcf7c9ac23e2da801c4c75bf3c6ff.tar.gz
portage-7df38f87fddbcf7c9ac23e2da801c4c75bf3c6ff.tar.bz2
portage-7df38f87fddbcf7c9ac23e2da801c4c75bf3c6ff.zip
Make dep_expand() stop relying on having a categories list:
* Create and use a dbapi.categories property that is automatically generated from dbapi.cp_all(). * Make mutable dbapi instances delete the invalidate the cached categories when they need to be regenerated. svn path=/main/trunk/; revision=9080
Diffstat (limited to 'pym/portage/dbapi/virtual.py')
-rw-r--r--pym/portage/dbapi/virtual.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pym/portage/dbapi/virtual.py b/pym/portage/dbapi/virtual.py
index fe9356212..3d5472f1e 100644
--- a/pym/portage/dbapi/virtual.py
+++ b/pym/portage/dbapi/virtual.py
@@ -26,6 +26,8 @@ class fakedbapi(dbapi):
self._match_cache = {}
def _clear_cache(self):
+ if hasattr(self, "_categories"):
+ del self._categories
if self._match_cache:
self._match_cache = {}