summaryrefslogtreecommitdiffstats
path: root/bin/ebuild.sh
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-03-01 08:31:39 +0000
committerZac Medico <zmedico@gentoo.org>2008-03-01 08:31:39 +0000
commit129d61e63c7267f786dfec3322c158686531d32f (patch)
treea552fbf1cd48f2457baf561474fbf6b82e372f55 /bin/ebuild.sh
parentedf4aa7cf938f71ba9d8faaefd7870cb66deb24c (diff)
downloadportage-129d61e63c7267f786dfec3322c158686531d32f.tar.gz
portage-129d61e63c7267f786dfec3322c158686531d32f.tar.bz2
portage-129d61e63c7267f786dfec3322c158686531d32f.zip
Bug #211949 - Make filter_readonly_variables() remove any variables
with names containing a hyphen since bash does not allow them. (trunk r9402) svn path=/main/branches/2.1.2/; revision=9403
Diffstat (limited to 'bin/ebuild.sh')
-rwxr-xr-xbin/ebuild.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 61f6e18fe..9d0c42a55 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -1384,8 +1384,12 @@ PORTAGE_MUTABLE_FILTERED_VARS="AA HOSTNAME"
# @FUNCTION: filter_readonly_variables
# @DESCRIPTION: [--filter-sandbox] [--allow-extra-vars]
-# Read an environment from stdin and echo to stdout while filtering readonly
-# variables.
+# Read an environment from stdin and echo to stdout while filtering variables
+# with names that are known to cause interference:
+#
+# * some specific variables for which bash does not allow assignment
+# * any variables with names containing a hyphen (not allowed by bash)
+# * some specific variables that affect portage or sandbox behavior
#
# --filter-sandbox causes all SANDBOX_* variables to be filtered, which
# is only desired in certain cases, such as during preprocessing or when
@@ -1414,7 +1418,7 @@ filter_readonly_variables() {
SANDBOX_DEBUG_LOG SANDBOX_DISABLED SANDBOX_LIB
SANDBOX_LOG SANDBOX_ON"
filtered_vars="${readonly_bash_vars} ${READONLY_PORTAGE_VARS}
- BASH_[_[:alnum:]]* PATH"
+ BASH_[_[:alnum:]]* PATH [-_[:alnum:]]*-[-_[:alnum:]]*"
if hasq --filter-sandbox $* ; then
filtered_vars="${filtered_vars} SANDBOX_[_[:alnum:]]*"
else