summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-12-23 10:32:00 +0000
committerZac Medico <zmedico@gentoo.org>2008-12-23 10:32:00 +0000
commitad6bd931c6a9f02b6b2d20ab4657dec4a3157e2e (patch)
tree3ff08d5f59c05961e3222450b627e5d9d9033856
parent31ac886e01812d12582b2647ba890897c749fd01 (diff)
downloadportage-ad6bd931c6a9f02b6b2d20ab4657dec4a3157e2e.tar.gz
portage-ad6bd931c6a9f02b6b2d20ab4657dec4a3157e2e.tar.bz2
portage-ad6bd931c6a9f02b6b2d20ab4657dec4a3157e2e.zip
When removing entries with duplicate paths inside binarytree.inject(), handle
path collisions in $PKGDIR/All when CPV is not identical. svn path=/main/trunk/; revision=12282
-rw-r--r--pym/portage/dbapi/bintree.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index 1b66cc9b8..edba51a39 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -861,11 +861,14 @@ class binarytree(object):
return
# If found, remove package(s) with duplicate path.
+ path = d.get("PATH")
for i in xrange(len(pkgindex.packages) - 1, -1, -1):
d2 = pkgindex.packages[i]
- if d2["CPV"] != cpv:
- continue
- if d2.get("PATH", "") == d.get("PATH", ""):
+ if path is not None and path == d2.get("PATH"):
+ # Handle path collisions in $PKGDIR/All
+ # when CPV is not identical.
+ del pkgindex.packages[i]
+ elif cpv == d2.get("CPV") and path == d2.get("PATH"):
del pkgindex.packages[i]
pkgindex.packages.append(d)