Clean up os.environ["USERLAND"] pollution from the portage.data module so that it...
authorZac Medico <zmedico@gentoo.org>
Sat, 24 Feb 2007 12:43:04 +0000 (12:43 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 24 Feb 2007 12:43:04 +0000 (12:43 -0000)
svn path=/main/trunk/; revision=6068

pym/portage/__init__.py

index 481c1be37ebc78b3ca1606ef9f05272546f951d5..57040b1cb9e3ef93d22d0ecb7b440949a0cc81d2 100644 (file)
@@ -911,6 +911,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):
@@ -1153,7 +1157,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[:]