summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-07-21 03:41:27 +0000
committerZac Medico <zmedico@gentoo.org>2006-07-21 03:41:27 +0000
commit4a031c34483f749c68ad9ab66dfe8f4ce89275f5 (patch)
tree4036a6fdbb114c28c98aa475c26731e0f138ea9d
parent8c4a9f07fe5547ee51fbbf4fb919a6b50c97c312 (diff)
downloadportage-4a031c34483f749c68ad9ab66dfe8f4ce89275f5.tar.gz
portage-4a031c34483f749c68ad9ab66dfe8f4ce89275f5.tar.bz2
portage-4a031c34483f749c68ad9ab66dfe8f4ce89275f5.zip
Blacklist some variables in the config constructor so that they can't interfere with portage internals.
svn path=/main/trunk/; revision=3973
-rw-r--r--pym/portage.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/pym/portage.py b/pym/portage.py
index e3eed28ab..3659839b3 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -1076,6 +1076,15 @@ class config:
self.lookuplist=self.configlist[:]
self.lookuplist.reverse()
+ # Blacklist vars that could interfere with portage internals.
+ for blacklisted in ["PKGUSE", "PORTAGE_CONFIGROOT", "ROOT"]:
+ for cfg in self.lookuplist:
+ try:
+ del cfg[blacklisted]
+ except KeyError:
+ pass
+ del blacklisted, cfg
+
self["PORTAGE_CONFIGROOT"] = config_root
self.backup_changes("PORTAGE_CONFIGROOT")
self["ROOT"] = target_root
@@ -1462,10 +1471,6 @@ class config:
if not self.uvlist:
for x in self["USE_ORDER"].split(":"):
if x in self.configdict:
- try:
- del self.configdict[x]["PKGUSE"]
- except KeyError:
- pass
self.uvlist.insert(0, self.configdict[x])
mydbs=self.uvlist
if "auto" in self["USE_ORDER"].split(":"):