summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-06 15:53:26 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-06 15:53:26 -0700
commit233dd1cad9ce4886210bd4183047f319bbfd12da (patch)
tree6a05c96f897753e54a56a5f4c7a61f58c3335652
parentautounmask: Add ability to adjust USE (diff)
downloadportage-multirepo-233dd1cad9ce4886210bd4183047f319bbfd12da.tar.gz
portage-multirepo-233dd1cad9ce4886210bd4183047f319bbfd12da.tar.bz2
portage-multirepo-233dd1cad9ce4886210bd4183047f319bbfd12da.zip
Use finally block for autounmask handling inside
_select_atoms_highest_available.
-rw-r--r--pym/_emerge/depgraph.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 691a7560..82388bb4 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -2138,13 +2138,15 @@ class depgraph(object):
"""This will raise InvalidDependString if necessary. If trees is
None then self._dynamic_config._filtered_trees is used."""
- _autounmask_backup = self._dynamic_config._autounmask
- self._dynamic_config._autounmask = False
pkgsettings = self._frozen_config.pkgsettings[root]
if trees is None:
trees = self._dynamic_config._filtered_trees
atom_graph = digraph()
if True:
+ # Temporarily disable autounmask so that || preferences
+ # account for masking and USE settings.
+ _autounmask_backup = self._dynamic_config._autounmask
+ self._dynamic_config._autounmask = False
try:
if parent is not None:
trees[root]["parent"] = parent
@@ -2157,6 +2159,7 @@ class depgraph(object):
pkgsettings, myuse=myuse,
myroot=root, trees=trees)
finally:
+ self._dynamic_config._autounmask = _autounmask_backup
if parent is not None:
trees[root].pop("parent")
trees[root].pop("atom_graph")
@@ -2190,7 +2193,6 @@ class depgraph(object):
selected_atoms[pkg] = [atom for atom in \
atom_graph.child_nodes(node) if atom in chosen_atoms]
- self._dynamic_config._autounmask = _autounmask_backup
return selected_atoms
def _show_unsatisfied_dep(self, root, atom, myparent=None, arg=None,