diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-11-28 12:15:43 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-11-28 12:15:43 +0000 |
commit | 2ba6ccafcbb0c07151cc7820bd3d292439183c9a (patch) | |
tree | 80fa5fc64ecb294737b7f0fb4aba591a7373674b | |
parent | 60314a305807ec9f163e9602ccb2c91f0ae2d23f (diff) | |
download | portage-2ba6ccafcbb0c07151cc7820bd3d292439183c9a.tar.gz portage-2ba6ccafcbb0c07151cc7820bd3d292439183c9a.tar.bz2 portage-2ba6ccafcbb0c07151cc7820bd3d292439183c9a.zip |
Bug #294945 - Fix blocker satistfied state handling inside depgraph, to
avoid a KeyError when displaying blockers.
svn path=/main/trunk/; revision=14914
-rw-r--r-- | pym/_emerge/depgraph.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index dff0d9a79..038ae6fca 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -3775,16 +3775,12 @@ class depgraph(object): # it serves as an indicator that blocking packages # will be temporarily installed simultaneously. for blocker in solved_blockers: - blocker.satisfied = True retlist.append(blocker) unsolvable_blockers = set(self._dynamic_config._unsolvable_blockers.leaf_nodes()) for node in myblocker_uninstalls.root_nodes(): unsolvable_blockers.add(node) - for blocker in unsolvable_blockers: - retlist.append(blocker) - # If any Uninstall tasks need to be executed in order # to avoid a conflict, complete the graph with any # dependencies that may have been initially @@ -3796,6 +3792,16 @@ class depgraph(object): self._dynamic_config.myparams["complete"] = True raise self._serialize_tasks_retry("") + # Set satisfied state on blockers, but not before the + # above retry path, since we don't want to modify the + # state in that case. + for node in retlist: + if isinstance(node, Blocker): + node.satisfied = True + + for blocker in unsolvable_blockers: + retlist.append(blocker) + if unsolvable_blockers and \ not self._accept_blocker_conflicts(): self._dynamic_config._unsatisfied_blockers_for_display = unsolvable_blockers |