summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-12-01 03:07:47 +0000
committerZac Medico <zmedico@gentoo.org>2007-12-01 03:07:47 +0000
commitc5f1846fceb8022a62f8525d0ecf3cf4a33b5adb (patch)
treef8a2c9aa71be10ccf139418b294490d4fc46c500
parentc7ab666453e4dc4e20ffbcd289a69ae7f2124f01 (diff)
downloadportage-c5f1846fceb8022a62f8525d0ecf3cf4a33b5adb.tar.gz
portage-c5f1846fceb8022a62f8525d0ecf3cf4a33b5adb.tar.bz2
portage-c5f1846fceb8022a62f8525d0ecf3cf4a33b5adb.zip
* whitelist DISTDIR, PORTDIR, and PORTAGE_TMPDIR, PORTAGE_WORKDIR_MODE.
* whitelist RPMDIR just for the "rpm" phase. svn path=/main/trunk/; revision=8779
-rw-r--r--pym/portage/__init__.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 4d75d626a..84ff78f39 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -864,10 +864,12 @@ class config(object):
# constructor. Also, preserve XARGS since it is set by the
# portage.data module.
_environ_whitelist += [
- "FEATURES", "PORTAGE_BIN_PATH",
+ "DISTDIR", "FEATURES", "PORTAGE_BIN_PATH",
"PORTAGE_CONFIGROOT", "PORTAGE_DEPCACHEDIR",
"PORTAGE_GID", "PORTAGE_INST_GID", "PORTAGE_INST_UID",
- "PORTAGE_PYM_PATH", "PORTDIR_OVERLAY", "ROOT", "ROOTPATH", "USE_ORDER",
+ "PORTAGE_PYM_PATH", "PORTAGE_WORKDIR_MODE",
+ "PORTDIR", "PORTDIR_OVERLAY",
+ "ROOT", "ROOTPATH", "USE_ORDER",
"XARGS",
]
@@ -2573,8 +2575,14 @@ class config(object):
mydict["HOME"]=mydict["BUILD_PREFIX"][:]
if filter_calling_env:
- if "package" == self.get("EBUILD_PHASE"):
- for k in ("PKGDIR", ):
+ phase = self.get("EBUILD_PHASE")
+ if phase:
+ whitelist = []
+ if "package" == phase:
+ whitelist.append("PKGDIR")
+ if "rpm" == phase:
+ whitelist.append("RPMDIR")
+ for k in whitelist:
v = self.get(k)
if v is not None:
mydict[k] = v