summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-13 21:46:59 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-13 21:46:59 +0000
commit629709cb8459689a81f0a22b88bda56e93722c4a (patch)
tree0abd2b6d4304aa33c816ccc073af9db3edec77d2
parent094e9c5789ad58c3ba450aa1f15b9ad4b0bf24de (diff)
downloadportage-629709cb8459689a81f0a22b88bda56e93722c4a.tar.gz
portage-629709cb8459689a81f0a22b88bda56e93722c4a.tar.bz2
portage-629709cb8459689a81f0a22b88bda56e93722c4a.zip
For bug #181953, prevent the circular_blocks code from selecting a node that's already been selected by the normal node selection process.
svn path=/main/trunk/; revision=6837
-rw-r--r--pym/emerge/__init__.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py
index 8b52ed356..b3a03b632 100644
--- a/pym/emerge/__init__.py
+++ b/pym/emerge/__init__.py
@@ -2120,8 +2120,16 @@ class depgraph:
if not circular_blocks:
circular_blocks = True
blocker_deps = myblockers.leaf_nodes()
- if blocker_deps:
- selected_nodes = [blocker_deps.pop()]
+ while blocker_deps:
+ # Some of these nodes might have already been selected
+ # by the normal node selection process after the
+ # circular_blocks flag has been set. Therefore, we
+ # have to verify that they're still in the graph so
+ # that they're not selected more than once.
+ node = blocker_deps.pop()
+ if mygraph.contains(node):
+ selected_nodes = [node]
+ break
if not selected_nodes:
# No leaf nodes are available, so we have a circular