Clean up os.environ["USERLAND"] pollution from the portage_data module so that it...
authorZac Medico <zmedico@gentoo.org>
Sat, 24 Feb 2007 12:45:42 +0000 (12:45 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 24 Feb 2007 12:45:42 +0000 (12:45 -0000)
svn path=/main/branches/2.1.2/; revision=6069

pym/portage.py

index 6205d7315047a58e5d3a22c6789f9e7dcdf70548..dd479aab0b887ff7bd9bce22aa69016aa8d65d08 100644 (file)
@@ -989,6 +989,10 @@ class config:
 
                        # backupenv is for calculated incremental variables.
                        self.backupenv = os.environ.copy()
+                       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):
@@ -1231,7 +1235,10 @@ class config:
 
                        self.configlist.append(os.environ.copy())
                        self.configdict["env"]=self.configlist[-1]
-
+                       if not local_config:
+                               # Clean up pollution from portage_data so that it doesn't
+                               # interfere with repoman.
+                               self.configdict["env"].pop("USERLAND", None)
 
                        # make lookuplist for loading package.*
                        self.lookuplist=self.configlist[:]