summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-20 17:31:08 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-20 17:31:08 -0700
commitc32aee053541993a3b7be732798976ed20faba69 (patch)
tree98350a644d566cb2ade3fa5703fadf7719c84bdd /pym
parent5959cb1b25d1d0d7c87fd982df72dfd2212f80a3 (diff)
downloadportage-c32aee053541993a3b7be732798976ed20faba69.tar.gz
portage-c32aee053541993a3b7be732798976ed20faba69.tar.bz2
portage-c32aee053541993a3b7be732798976ed20faba69.zip
At some point we may want to stop exporting FEATURES to the ebuild
environment, in order to prevent ebuilds from abusing it. In preparation for that, export it as PORTAGE_FEATURES so that bashrc users will be able to migrate any FEATURES conditional code to use this alternative variable.
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/package/ebuild/config.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 7d824c47f..51fc0b157 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -233,7 +233,8 @@ class config(object):
"PORTAGE_BIN_PATH",
"PORTAGE_BUILDDIR", "PORTAGE_COLORMAP",
"PORTAGE_CONFIGROOT", "PORTAGE_DEBUG", "PORTAGE_DEPCACHEDIR",
- "PORTAGE_EBUILD_EXIT_FILE", "PORTAGE_GID", "PORTAGE_GRPNAME",
+ "PORTAGE_EBUILD_EXIT_FILE", "PORTAGE_FEATURES",
+ "PORTAGE_GID", "PORTAGE_GRPNAME",
"PORTAGE_INST_GID", "PORTAGE_INST_UID",
"PORTAGE_IPC_DAEMON", "PORTAGE_IUSE",
"PORTAGE_LOG_FILE", "PORTAGE_MASTER_PID",
@@ -2828,6 +2829,13 @@ class config(object):
if v is not None:
mydict[k] = v
+ # At some point we may want to stop exporting FEATURES to the ebuild
+ # environment, in order to prevent ebuilds from abusing it. In
+ # preparation for that, export it as PORTAGE_FEATURES so that bashrc
+ # users will be able to migrate any FEATURES conditional code to
+ # use this alternative variable.
+ mydict["PORTAGE_FEATURES"] = self["FEATURES"]
+
# Filtered by IUSE and implicit IUSE.
mydict["USE"] = self.get("PORTAGE_USE", "")