expand_new_virtuals: handle None for myuse v2.2.0_alpha22
authorZac Medico <zmedico@gentoo.org>
Tue, 8 Feb 2011 00:42:37 +0000 (16:42 -0800)
committerZac Medico <zmedico@gentoo.org>
Tue, 8 Feb 2011 00:42:37 +0000 (16:42 -0800)
pym/portage/dep/dep_check.py

index 9373ecbbca43bb8313863023b99b22a1b1baff38..ca656019daa8a6faeca64c1f7a25f0ac82217967 100644 (file)
@@ -125,7 +125,11 @@ def _expand_new_virtuals(mysplit, edebug, mydbapi, mysettings, myroot="/",
                                virt_atom += str(x.unevaluated_atom.use)
                                virt_atom = Atom(virt_atom)
                                if graph_parent is None:
-                                       virt_atom = virt_atom.evaluate_conditionals(myuse)
+                                       if myuse is None:
+                                               virt_atom = virt_atom.evaluate_conditionals(
+                                                       mysettings.get("PORTAGE_USE", "").split())
+                                       else:
+                                               virt_atom = virt_atom.evaluate_conditionals(myuse)
                                else:
                                        virt_atom = virt_atom.evaluate_conditionals(
                                                pkg_use_enabled(graph_parent))