From b6b26a099d6b618170370b7f3012451374c9b7f4 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 18 Sep 2010 00:58:29 -0700 Subject: [PATCH] Never traverse the same node twice when showing parents in depgraph._show_unsatisfied_dep(). --- pym/_emerge/depgraph.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.26.2