expand_new_virtuals: fix logic from prev commit
authorZac Medico <zmedico@gentoo.org>
Mon, 7 Feb 2011 11:43:06 +0000 (03:43 -0800)
committerZac Medico <zmedico@gentoo.org>
Tue, 8 Feb 2011 00:53:00 +0000 (16:53 -0800)
We need to evaluate conditionals for dependency matching purposes,
though the unevaluated atom will still be available later for other
purposes.

pym/portage/dep/dep_check.py

index 3381af9ca220db41c338e62eb3b84723e70f0215..da9b4e5407cccf9aa11c50d33d37e416797607cf 100644 (file)
@@ -123,7 +123,11 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/",
                        virt_atom = '=' + pkg.cpv
                        if x.unevaluated_atom.use:
                                virt_atom += str(x.unevaluated_atom.use)
-                       virt_atom = Atom(virt_atom)
+                               virt_atom = Atom(virt_atom)
+                               virt_atom = virt_atom.evaluate_conditionals(
+                                       pkg_use_enabled(graph_parent))
+                       else:
+                               virt_atom = Atom(virt_atom)
                        # According to GLEP 37, RDEPEND is the only dependency
                        # type that is valid for new-style virtuals. Repoman
                        # should enforce this.