When checking for conflicts between packages inside depgraph._greedy_slots(),
authorZac Medico <zmedico@gentoo.org>
Mon, 12 Jan 2009 16:51:36 +0000 (16:51 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 12 Jan 2009 16:51:36 +0000 (16:51 -0000)
never double-check any of the pairs. (trunk r12486)

svn path=/main/branches/2.1.6/; revision=12487

pym/_emerge/__init__.py

index 922a28d2d8c4ecb34a12715de35eafe3179531b7..b850e948364c09f35c1717e8910601fde27b8303 100644 (file)
@@ -5685,14 +5685,14 @@ class depgraph(object):
                # If two packages conflict, discard the lower version.
                discard_pkgs = set()
                greedy_pkgs.sort(reverse=True)
-               for pkg1 in greedy_pkgs:
+               for i in xrange(len(greedy_pkgs) - 1):
+                       pkg1 = greedy_pkgs[i]
                        if pkg1 in discard_pkgs:
                                continue
-                       for pkg2 in greedy_pkgs:
+                       for j in xrange(i + 1, len(greedy_pkgs)):
+                               pkg2 = greedy_pkgs[j]
                                if pkg2 in discard_pkgs:
                                        continue
-                               if pkg1 is pkg2:
-                                       continue
                                if blockers[pkg1].findAtomForPackage(pkg2) or \
                                        blockers[pkg2].findAtomForPackage(pkg1):
                                        # pkg1 > pkg2