From 5b52509c353c478bcc015949ce8da500d2c3b52a Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 12 Jan 2009 16:47:01 +0000 Subject: [PATCH] When checking for conflicts between packages inside depgraph._greedy_slots(), never double-check any of the pairs. svn path=/main/trunk/; revision=12486 --- pym/_emerge/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index dc1d932a2..9120cf804 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -5701,14 +5701,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 -- 2.26.2