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:04:46 +0000 (07:04 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 12 Feb 2007 07:04:46 +0000 (07:04 -0000)
svn path=/main/trunk/; revision=5956

bin/emerge

index e97127b4f1029d871a1c6fe3bbf0f5ca0c015b66..1c8e02f6a030889ee535c2a20da7b55b7ebdca4f 100755 (executable)
@@ -2057,6 +2057,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)