* [gentoo-commits] portage r12051 - main/trunk/pym/_emerge
@ 2008-11-23 7:47 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-11-23 7:47 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2008-11-23 07:46:59 +0000 (Sun, 23 Nov 2008)
New Revision: 12051
Modified:
main/trunk/pym/_emerge/__init__.py
Log:
Fix the code from bug #245358 so that it's guaranteed to traverse all the
way to a root node, even when circular deps are encountered.
Modified: main/trunk/pym/_emerge/__init__.py
===================================================================
--- main/trunk/pym/_emerge/__init__.py 2008-11-23 05:50:32 UTC (rev 12050)
+++ main/trunk/pym/_emerge/__init__.py 2008-11-23 07:46:59 UTC (rev 12051)
@@ -5411,17 +5411,19 @@
traversed_nodes.add(node)
msg.append('(dependency required by "%s" [%s])' % \
(colorize('INFORM', str(node.cpv)), node.type_name))
- parent = None
+ # When traversing to parents, prefer arguments over packages
+ # since arguments are root nodes. Never traverse the same
+ # package twice, in order to prevent an infinite loop.
+ selected_parent = None
for parent in self.digraph.parent_nodes(node):
- if parent in traversed_nodes:
- parent = None
- continue
if isinstance(parent, DependencyArg):
msg.append('(dependency required by "%s" [argument])' % \
(colorize('INFORM', str(parent))))
- parent = None
+ selected_parent = None
break
- node = parent
+ if parent not in traversed_nodes:
+ selected_parent = parent
+ node = selected_parent
for line in msg:
print line
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-11-23 7:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-23 7:47 [gentoo-commits] portage r12051 - main/trunk/pym/_emerge Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox