Add more dependencies to the digraph in order to help prevent strange merge orders...
authorZac Medico <zmedico@gentoo.org>
Mon, 31 Jul 2006 15:08:10 +0000 (15:08 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 31 Jul 2006 15:08:10 +0000 (15:08 -0000)
svn path=/main/branches/2.1/; revision=4054

bin/emerge

index fce95547a12303349784b606482fc4f32c9cc99b..ee195e12d099da5446dd4f22c903eac023953509 100755 (executable)
@@ -925,9 +925,15 @@ class depgraph:
                #"no downgrade" emerge
                #print "mybigkey:",mybigkey
 
-               jbigkey=string.join(mybigkey)
-               if self.digraph.hasnode(jbigkey+" merge") or self.digraph.hasnode(jbigkey+" nomerge"):
-                       #this conditional is needed to prevent infinite recursion on already-processed deps
+               jbigkey = " ".join(mybigkey) + " merge"
+               if self.digraph.hasnode(jbigkey):
+                       if addme and jbigkey != myparent:
+                               # Refuse to make a node depend on itself so that the we don't
+                               # don't create a bogus circular dependency in self.altlist().
+                               self.digraph.addnode(jbigkey, myparent)
+                       return 1
+               jbigkey = " ".join(mybigkey) + " nomerge"
+               if self.digraph.hasnode(jbigkey):
                        return 1
 
                update_spinner()