From 863859e809671dfbd7718d2becb8ee7ca3c74433 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 1 Dec 2007 03:09:06 +0000 Subject: [PATCH] * whitelist DISTDIR, PORTDIR, and PORTAGE_TMPDIR, PORTAGE_WORKDIR_MODE. * whitelist RPMDIR just for the "rpm" phase. (trunk r8779) svn path=/main/branches/2.1.2/; revision=8780 --- pym/portage.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pym/portage.py b/pym/portage.py index ee39a537d..be46e5fe3 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -1004,10 +1004,12 @@ class config: # 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", ] @@ -2559,8 +2561,14 @@ class config: 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 -- 2.26.2