From: Zac Medico Date: Sat, 18 Sep 2010 07:58:29 +0000 (-0700) Subject: Never traverse the same node twice when showing parents in X-Git-Tag: v2.2_rc84~15 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b6b26a099d6b618170370b7f3012451374c9b7f4;p=portage.git Never traverse the same node twice when showing parents in depgraph._show_unsatisfied_dep(). --- diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index a2f3e091e..3c8d41eb4 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -2387,6 +2387,8 @@ class depgraph(object): # package twice, in order to prevent an infinite loop. selected_parent = None for parent in self._dynamic_config.digraph.parent_nodes(node): + if parent in traversed_nodes: + continue if isinstance(parent, DependencyArg): if self._dynamic_config.digraph.parent_nodes(parent): selected_parent = parent @@ -2395,7 +2397,7 @@ class depgraph(object): colorize('INFORM', _unicode_decode("%s") % (parent,))) selected_parent = None break - if parent not in traversed_nodes: + else: selected_parent = parent node = selected_parent writemsg_stdout("\n".join(msg), noiselevel=-1)