Remove blocker nodes from the digraph prior to the merge order calculation so that...
authorZac Medico <zmedico@gentoo.org>
Mon, 16 Oct 2006 21:34:10 +0000 (21:34 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 16 Oct 2006 21:34:10 +0000 (21:34 -0000)
svn path=/main/trunk/; revision=4728

bin/emerge

index 86bf640b08d212fdbb333b705954805973c9b4b3..ab5fe2fc1697d0998d12ce0eb07e45a46d2d28cc 100755 (executable)
@@ -1385,6 +1385,13 @@ class depgraph:
 
        def altlist(self, reversed=False):
                mygraph=self.digraph.copy()
+               for node in self.blocker_digraph.root_nodes():
+                       """These nodes aren't needed for the merge order calculation.  They
+                       may be in the digraph for --tree support, but they need to be
+                       removed prior to the merge order calculation so that they don't
+                       trigger any false circular dependency issues."""
+                       if mygraph.contains(node):
+                               mygraph.remove(node)
                myblockers = self.blocker_digraph.copy()
                retlist=[]
                circular_blocks = False
@@ -1460,6 +1467,7 @@ class depgraph:
                for node in myblockers.root_nodes():
                        retlist.append(node.split())
                        for parent in self.blocker_parents[node]:
+                               # Valid blockers need to be in the digraph for --tree support.
                                self.digraph.add(node, parent)
 
                return retlist