In depgraph.altlist(), pop as many leaf nodes as possible when no relationship has...
authorZac Medico <zmedico@gentoo.org>
Sun, 17 Dec 2006 10:17:54 +0000 (10:17 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 17 Dec 2006 10:17:54 +0000 (10:17 -0000)
svn path=/main/trunk/; revision=5308

bin/emerge

index 771e61a99e941a98981d9e967ab644361ff04456..7bbd94d262257441bf88c1dd031cde74cf80c5e7 100755 (executable)
@@ -1745,7 +1745,13 @@ class depgraph:
                        selected_nodes = None
                        if nodes:
                                if ignore_priority <= DepPriority.SOFT:
-                                       selected_nodes = [nodes[0]]
+                                       if ignore_priority is None:
+                                               # Greedily pop all of these nodes since no relationship
+                                               # has been ignored.
+                                               selected_nodes = nodes
+                                       else:
+                                               # Only pop one node for optimal merge order.
+                                               selected_nodes = [nodes[0]]
                                else:
                                        """Recursively gather a group of nodes that RDEPEND on
                                        eachother.  This ensures that they are merged as a group