diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-12-28 18:20:29 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-12-28 18:20:29 +0000 |
commit | 7df38f87fddbcf7c9ac23e2da801c4c75bf3c6ff (patch) | |
tree | 0f145135e940dacc98bfd212c6215f1e1935e098 /pym/portage/dbapi/virtual.py | |
parent | 7d4568d88aa55ec458ae6057fc6347785e6630ed (diff) | |
download | portage-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.py | 2 |
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 = {} |