In the event of a circular dependency panic, eliminate root nodes in order to reduce...
authorZac Medico <zmedico@gentoo.org>
Mon, 12 Feb 2007 07:11:06 +0000 (07:11 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 12 Feb 2007 07:11:06 +0000 (07:11 -0000)
svn path=/main/branches/2.1.2/; revision=5957

bin/emerge

index a4888188a32133857b351dcdc7dfe6e84285cf0a..06e9b9eb25f50e609b10b4d7a578c8e0f9c71a5c 100755 (executable)
@@ -2054,6 +2054,15 @@ class depgraph:
                                        self.altlist()
                                print "!!! Error: circular dependencies:"
                                print
+                               # Reduce the noise level to a minimum via elimination of root
+                               # nodes.
+                               while True:
+                                       root_nodes = mygraph.root_nodes(
+                                               ignore_priority=DepPriority.SOFT)
+                                       if not root_nodes:
+                                               break
+                                       for node in root_nodes:
+                                               mygraph.remove(node)
                                mygraph.debug_print()
                                sys.exit(1)