Fix an AttributeError for config.backupenv.
authorZac Medico <zmedico@gentoo.org>
Wed, 21 Nov 2007 06:26:53 +0000 (06:26 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 21 Nov 2007 06:26:53 +0000 (06:26 -0000)
svn path=/main/branches/2.1.2/; revision=8572

pym/portage.py

index 6189bfe89e733c5f131bb0326033d9c88eee23ac..8081737f1d70fe9eb474a5b96e419e8bdbafa385 100644 (file)
@@ -1071,11 +1071,6 @@ class config:
                        self._use_wildcards = copy.deepcopy(clone._use_wildcards)
                else:
 
-                       if not local_config:
-                               # Clean up pollution from portage_data so that it doesn't
-                               # interfere with repoman.
-                               self.backupenv.pop("USERLAND", None)
-
                        def check_var_directory(varname, var):
                                if not os.path.isdir(var):
                                        writemsg(("!!! Error: %s='%s' is not a directory. " + \
@@ -1333,6 +1328,11 @@ class config:
                        self.configlist.append(self.backupenv) # XXX Why though?
                        self.configdict["backupenv"]=self.configlist[-1]
 
+                       if not local_config:
+                               # Clean up pollution from portage_data so that it doesn't
+                               # interfere with repoman.
+                               self.backupenv.pop("USERLAND", None)
+
                        # Don't allow the user to override certain variables in the env
                        for k in profile_only_variables:
                                self.backupenv.pop(k, None)