doesn't have a message, eliminate root nodes before calling
digraph.debug_print(). If --debug is enabled then do this even if
circular_dependency_handler has a message.
noiselevel=-1)
portage.writemsg("\n", noiselevel=-1)
- if handler.circular_dep_message is None:
- mygraph.debug_print()
- else:
+ if handler.circular_dep_message is None or \
+ "--debug" in self._frozen_config.myopts:
+ handler.debug_print()
+ portage.writemsg("\n", noiselevel=-1)
+
+ if handler.circular_dep_message is not None:
portage.writemsg(handler.circular_dep_message, noiselevel=-1)
suggestions = handler.suggestions
final_solutions.setdefault(pkg, set()).add(solution)
return final_solutions, suggestions
+
+ def debug_print(self):
+ """
+ Create a copy of the digraph, prune all root nodes,
+ and call the debug_print() method.
+ """
+ graph = self.graph.copy()
+ while True:
+ root_nodes = graph.root_nodes(
+ ignore_priority=DepPrioritySatisfiedRange.ignore_medium_soft)
+ if not root_nodes:
+ break
+ graph.difference_update(root_nodes)
+
+ graph.debug_print()