summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-12-12 01:33:26 +0000
committerZac Medico <zmedico@gentoo.org>2008-12-12 01:33:26 +0000
commitab26befd0661dfaaea123d05139edf0394bd97e6 (patch)
treeb44b2281f8d799b30a86635bbf34e65553290cbd
parent9578e499f03597e07652757c9e2c8e97be71df2f (diff)
downloadportage-ab26befd0661dfaaea123d05139edf0394bd97e6.tar.gz
portage-ab26befd0661dfaaea123d05139edf0394bd97e6.tar.bz2
portage-ab26befd0661dfaaea123d05139edf0394bd97e6.zip
Fix breakage in stale metadata logic inside binarytree._poplulate().
svn path=/main/trunk/; revision=12211
-rw-r--r--pym/portage/dbapi/bintree.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index 1e9f9aeeb..04f598a13 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -598,13 +598,14 @@ class binarytree(object):
aux_cache[k] = d[k]
self.dbapi._aux_cache[mycpv] = aux_cache
+ for cpv in list(metadata):
+ if cpv not in pkg_paths:
+ del metadata[cpv]
+
# Do not bother to write the Packages index if $PKGDIR/All/ exists
# since it will provide no benefit due to the need to read CATEGORY
# from xpak.
if update_pkgindex and os.access(self.pkgdir, os.W_OK):
- stale = [cpv for cpv in metadata if cpv not in self._pkg_paths]
- for cpv in stale:
- del metadata[cpv]
del pkgindex.packages[:]
pkgindex.packages.extend(metadata.itervalues())
self._update_pkgindex_header(pkgindex.header)