diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-08-06 15:38:21 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-08-06 15:54:05 -0700 |
commit | d306ffaab50cc43a287a57bb96cd40a7efbf4f95 (patch) | |
tree | dc22496e7bba57ec42be0f4394ff12b53648aa49 | |
parent | Use finally block for autounmask handling inside (diff) | |
download | portage-multirepo-d306ffaab50cc43a287a57bb96cd40a7efbf4f95.tar.gz portage-multirepo-d306ffaab50cc43a287a57bb96cd40a7efbf4f95.tar.bz2 portage-multirepo-d306ffaab50cc43a287a57bb96cd40a7efbf4f95.zip |
Make dep_check use depgraph._pkg_use_enabled to query USE settings of new-style virtuals when appropriate.
-rw-r--r-- | pym/_emerge/depgraph.py | 3 | ||||
-rw-r--r-- | pym/portage/dep/dep_check.py | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 82388bb4..d765055b 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -2141,12 +2141,14 @@ class depgraph(object): pkgsettings = self._frozen_config.pkgsettings[root] if trees is None: trees = self._dynamic_config._filtered_trees + mytrees = trees[root] 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 + mytrees["pkg_use_enabled"] = self._pkg_use_enabled try: if parent is not None: trees[root]["parent"] = parent @@ -2160,6 +2162,7 @@ class depgraph(object): myroot=root, trees=trees) finally: self._dynamic_config._autounmask = _autounmask_backup + del mytrees["pkg_use_enabled"] if parent is not None: trees[root].pop("parent") trees[root].pop("atom_graph") diff --git a/pym/portage/dep/dep_check.py b/pym/portage/dep/dep_check.py index f4a44611..8747bb14 100644 --- a/pym/portage/dep/dep_check.py +++ b/pym/portage/dep/dep_check.py @@ -28,6 +28,7 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/", newsplit = [] mytrees = trees[myroot] portdb = mytrees["porttree"].dbapi + pkg_use_enabled = mytrees.get("pkg_use_enabled") atom_graph = mytrees.get("atom_graph") parent = mytrees.get("parent") virt_parent = mytrees.get("virt_parent") @@ -100,7 +101,8 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/", atom_graph.add(x, graph_parent) continue - if repoman or not hasattr(portdb, 'match_pkgs'): + if repoman or not hasattr(portdb, 'match_pkgs') or \ + pkg_use_enabled is None: if portdb.cp_list(x.cp): newsplit.append(x) else: @@ -149,7 +151,7 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/", # should enforce this. depstring = pkg.metadata['RDEPEND'] pkg_kwargs = kwargs.copy() - pkg_kwargs["myuse"] = pkg.use.enabled + pkg_kwargs["myuse"] = pkg_use_enabled(pkg) if edebug: writemsg_level(_("Virtual Parent: %s\n") \ % (pkg,), noiselevel=-1, level=logging.DEBUG) |