diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-07-30 04:06:52 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-07-30 04:06:52 +0000 |
commit | 1c59d0d4da316d407a169ffa24679bde1687f6c0 (patch) | |
tree | 5bff44b51e1231a89c38fa7db46c435c60b8b1cd | |
parent | f3030774f447a87ac433807e4cc496643be32b9d (diff) | |
download | portage-1c59d0d4da316d407a169ffa24679bde1687f6c0.tar.gz portage-1c59d0d4da316d407a169ffa24679bde1687f6c0.tar.bz2 portage-1c59d0d4da316d407a169ffa24679bde1687f6c0.zip |
For bug #181953, prevent the circular_blocks code from selecting a node that's already been selected by the normal node selection process. (branches/2.1.2 r6838)
svn path=/main/branches/2.1.2.9/; revision=7463
-rwxr-xr-x | bin/emerge | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/emerge b/bin/emerge index 31868d2fb..244ed3c9f 100755 --- a/bin/emerge +++ b/bin/emerge @@ -2086,8 +2086,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 |