diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-04-11 20:11:31 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-04-11 20:11:31 +0000 |
commit | 882da0c75eee6d517f51835f16d11a6e50858769 (patch) | |
tree | 74b9052c50c36f700a0bef0223cdac0eb970ff33 | |
parent | d31dfa840ca5219b0f5641503db3178acbfc1c98 (diff) | |
download | portage-882da0c75eee6d517f51835f16d11a6e50858769.tar.gz portage-882da0c75eee6d517f51835f16d11a6e50858769.tar.bz2 portage-882da0c75eee6d517f51835f16d11a6e50858769.zip |
When dep_check() expands new-style virtuals, use USE flags from aux_get
calls to evaluate any conditionals that the depstrings might contain. This
works properly for ebuilds now that aux_get() is backed by Package instances
containing the correct USE.
svn path=/main/trunk/; revision=9839
-rw-r--r-- | pym/portage/__init__.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 0a240002b..b5227b1e0 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -5364,12 +5364,16 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/", else: a = ['||'] for y in pkgs: - depstring = " ".join(y[2].aux_get(y[0], dep_keys)) + cpv, pv_split, db = y + depstring = " ".join(db.aux_get(cpv, dep_keys)) + use_split = db.aux_get(cpv, ["USE"])[0].split() + pkg_kwargs = kwargs.copy() + pkg_kwargs["myuse"] = use_split if edebug: print "Virtual Parent: ", y[0] print "Virtual Depstring:", depstring mycheck = dep_check(depstring, mydbapi, mysettings, myroot=myroot, - trees=trees, **kwargs) + trees=trees, **pkg_kwargs) if not mycheck[0]: raise portage.exception.ParseError( "%s: %s '%s'" % (y[0], mycheck[1], depstring)) |