Fix broken PATH comparisons when eliminating duplicate entries inside
authorZac Medico <zmedico@gentoo.org>
Wed, 24 Dec 2008 01:15:01 +0000 (01:15 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 24 Dec 2008 01:15:01 +0000 (01:15 -0000)
binarytree.inject().

svn path=/main/trunk/; revision=12294

pym/portage/dbapi/bintree.py

index edba51a39f45e543bb6aba0da45c6ddbd27a9d6f..87611bf06fc5db25d1f960fdedb9c1cc7f2550d4 100644 (file)
@@ -861,14 +861,14 @@ class binarytree(object):
                                return
 
                        # If found, remove package(s) with duplicate path.
-                       path = d.get("PATH")
+                       path = d.get("PATH", "")
                        for i in xrange(len(pkgindex.packages) - 1, -1, -1):
                                d2 = pkgindex.packages[i]
                                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"):
+                               elif cpv == d2.get("CPV") and path == d2.get("PATH", ""):
                                        del pkgindex.packages[i]
                        pkgindex.packages.append(d)