summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-02-24 12:43:04 +0000
committerZac Medico <zmedico@gentoo.org>2007-02-24 12:43:04 +0000
commit4cacc8846414beadaccc8f14f70130ad2deb249b (patch)
treed6ff5cf87a46d7328ff4f2395cacdafd3e22f9c7
parentfc8b4972964026c4f151bcc932655de91f29809b (diff)
downloadportage-4cacc8846414beadaccc8f14f70130ad2deb249b.tar.gz
portage-4cacc8846414beadaccc8f14f70130ad2deb249b.tar.bz2
portage-4cacc8846414beadaccc8f14f70130ad2deb249b.zip
Clean up os.environ["USERLAND"] pollution from the portage.data module so that it doesn't interfere with repoman.
svn path=/main/trunk/; revision=6068
-rw-r--r--pym/portage/__init__.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 481c1be37..57040b1cb 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -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[:]