expand_new_virtuals: save atom unevaluated use
authorZac Medico <zmedico@gentoo.org>
Mon, 7 Feb 2011 11:11:08 +0000 (03:11 -0800)
committerZac Medico <zmedico@gentoo.org>
Mon, 7 Feb 2011 11:11:08 +0000 (03:11 -0800)
This leads to a better unsatisfied USE message than the one reported
in bug 353933, comment #3. TODO: Fix it so that these generated
atoms don't break depgraph._get_dep_chain(), due to not being
identical to the original atoms and therefore breaking
extract_affecting_use().

pym/portage/dep/dep_check.py

index cd740cda3df64603ddf8c5e714dd746f7e8f1224..3381af9ca220db41c338e62eb3b84723e70f0215 100644 (file)
@@ -121,8 +121,8 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/",
                a = []
                for pkg in pkgs:
                        virt_atom = '=' + pkg.cpv
-                       if x.use:
-                               virt_atom += str(x.use)
+                       if x.unevaluated_atom.use:
+                               virt_atom += str(x.unevaluated_atom.use)
                        virt_atom = Atom(virt_atom)
                        # According to GLEP 37, RDEPEND is the only dependency
                        # type that is valid for new-style virtuals. Repoman