From: Zac Medico Date: Sat, 11 Jun 2011 16:26:47 +0000 (-0700) Subject: serialize_tasks: debug output for runtime cycles X-Git-Tag: v2.2.0_alpha40~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3e5b65a93e92a4cdb1c5e32c1ae8cf3c605b8391;p=portage.git serialize_tasks: debug output for runtime cycles --- diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 37dde2d81..41924b460 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -4698,7 +4698,9 @@ class depgraph(object): def _serialize_tasks(self): - if "--debug" in self._frozen_config.myopts: + debug = "--debug" in self._frozen_config.myopts + + if debug: writemsg("\ndigraph:\n\n", noiselevel=-1) self._dynamic_config.digraph.debug_print() writemsg("\n", noiselevel=-1) @@ -5050,6 +5052,15 @@ class depgraph(object): selected_nodes = smallest_cycle + if selected_nodes and debug: + writemsg("\nruntime cycle digraph (%s nodes):\n\n" % + (len(selected_nodes),), noiselevel=-1) + cycle_digraph = mygraph.copy() + cycle_digraph.difference_update([x for x in + cycle_digraph if x not in selected_nodes]) + cycle_digraph.debug_print() + writemsg("\n", noiselevel=-1) + if prefer_asap and asap_nodes and not selected_nodes: # We failed to find any asap nodes to merge, so ignore # them for the next iteration.