summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-07-25 03:18:26 +0000
committerZac Medico <zmedico@gentoo.org>2006-07-25 03:18:26 +0000
commitc1adb11fbb479d6548668509fee0daa6b751bca6 (patch)
tree914de0c78422c7f97d0bbb417d1e423e23857d05
parentf5ca8d72597d533c9ff55f2f97df1517b381859a (diff)
downloadportage-c1adb11fbb479d6548668509fee0daa6b751bca6.tar.gz
portage-c1adb11fbb479d6548668509fee0daa6b751bca6.tar.bz2
portage-c1adb11fbb479d6548668509fee0daa6b751bca6.zip
Add more dependencies to the digraph in order to help prevent strange merge orders for bug #126748.
svn path=/main/trunk/; revision=4019
-rwxr-xr-xbin/emerge10
-rw-r--r--pym/portage.py4
2 files changed, 11 insertions, 3 deletions
diff --git a/bin/emerge b/bin/emerge
index 75258b12b..6e4dae692 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -689,9 +689,13 @@ class depgraph:
#"no downgrade" emerge
"""
- jbigkey=string.join(mybigkey)
- # Prevent cycles where packages are already in the digraph
- if self.digraph.hasnode(jbigkey+" merge") or self.digraph.hasnode(jbigkey+" nomerge"):
+ jbigkey = " ".join(mybigkey) + " merge"
+ if self.digraph.hasnode(jbigkey):
+ if addme:
+ self.digraph.addnode(jbigkey, myparent)
+ return 1
+ jbigkey = " ".join(mybigkey) + " nomerge"
+ if self.digraph.hasnode(jbigkey):
return 1
self.spinner.update()
diff --git a/pym/portage.py b/pym/portage.py
index c46aea9f9..96791b377 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -318,6 +318,10 @@ class digraph:
self.okeys=[]
def addnode(self,mykey,myparent):
+ if mykey == myparent:
+ # Refuse to make a node depend on itself so that the caller doesn't
+ # accidentally create a bogus circular dependency.
+ myparent = None
if not self.dict.has_key(mykey):
self.okeys.append(mykey)
if myparent is None: