Fix autouse so that it works with init_legacy_globals() disabled.
authorZac Medico <zmedico@gentoo.org>
Sat, 1 Jul 2006 10:21:49 +0000 (10:21 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 1 Jul 2006 10:21:49 +0000 (10:21 -0000)
svn path=/main/trunk/; revision=3735

pym/portage.py

index 227d7e21a885e8befe3246873db8759849fda1e2..2ad107d1753fc3db49d4f3c1e78a05c1fd861de4 100644 (file)
@@ -832,7 +832,8 @@ def autouse(myvartree, use_cache=1, mysettings=None):
                                break
                if dep_met:
                        myusevars += " "+myuse
-       autouse_val = myusevars
+       if myusevars:
+               autouse_val = myusevars
        return myusevars
 
 def check_config_instance(test):
@@ -1511,7 +1512,7 @@ class config:
                for mykey in myincrementals:
                        if mykey=="USE":
                                mydbs=self.uvlist
-                               if "auto" in self["USE_ORDER"].split(":") and "settings" in globals():
+                               if "auto" in self["USE_ORDER"].split(":"):
                                        self.configdict["auto"]["USE"] = autouse(
                                                vartree(root=self["ROOT"], categories=self.categories,
                                                        settings=self),