diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-09-06 00:19:10 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-09-06 00:19:10 -0700 |
commit | 7900fad943674ac24c4dbd4e9f2ee0bb1960c7e2 (patch) | |
tree | 5230adedf3b1e92edbe2d62cf03c56f3cb084ade | |
parent | 16cd42f25994f53359679c0fbc02474259815ffc (diff) | |
download | portage-7900fad943674ac24c4dbd4e9f2ee0bb1960c7e2.tar.gz portage-7900fad943674ac24c4dbd4e9f2ee0bb1960c7e2.tar.bz2 portage-7900fad943674ac24c4dbd4e9f2ee0bb1960c7e2.zip |
Fix FakeVartree.sync() to remove stale packages from _pkg_cache.
-rw-r--r-- | pym/_emerge/FakeVartree.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pym/_emerge/FakeVartree.py b/pym/_emerge/FakeVartree.py index 3d07af412..97675708b 100644 --- a/pym/_emerge/FakeVartree.py +++ b/pym/_emerge/FakeVartree.py @@ -131,12 +131,14 @@ class FakeVartree(vartree): real_vardb = self._root_config.trees["vartree"].dbapi current_cpv_set = frozenset(real_vardb.cpv_all()) pkg_vardb = self.dbapi + pkg_cache = self._pkg_cache aux_get_history = self._aux_get_history # Remove any packages that have been uninstalled. for pkg in list(pkg_vardb): if pkg.cpv not in current_cpv_set: pkg_vardb.cpv_remove(pkg) + pkg_cache.pop(pkg, None) aux_get_history.discard(pkg.cpv) # Validate counters and timestamps. @@ -157,6 +159,7 @@ class FakeVartree(vartree): if counter != pkg.counter or \ mtime != pkg.mtime: pkg_vardb.cpv_remove(pkg) + pkg_cache.pop(pkg, None) aux_get_history.discard(pkg.cpv) pkg = None |