diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-03-14 18:20:49 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-03-14 18:20:49 +0000 |
commit | 07f7ba64e55c52e14f8509fc519cb0648f5c6a55 (patch) | |
tree | 89c4fda8bc5ca70c37b1957e51c0db297d1f5793 /bin/ebuild.sh | |
parent | 18b168ec8a0fb81c4a631049bea041aa14c1dd77 (diff) | |
download | portage-07f7ba64e55c52e14f8509fc519cb0648f5c6a55.tar.gz portage-07f7ba64e55c52e14f8509fc519cb0648f5c6a55.tar.bz2 portage-07f7ba64e55c52e14f8509fc519cb0648f5c6a55.zip |
Sync the fixes for bug #211949 from trunk.
svn path=/main/branches/2.1.2/; revision=9465
Diffstat (limited to 'bin/ebuild.sh')
-rwxr-xr-x | bin/ebuild.sh | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 2f17d0e7e..3cf834f6b 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -1412,18 +1412,16 @@ PORTAGE_MUTABLE_FILTERED_VARS="AA HOSTNAME" # builtin command. To avoid this problem, this function filters those # variables out and discards them. See bug #190128. filter_readonly_variables() { - local x filtered_vars var_grep + local x filtered_vars local readonly_bash_vars="DIRSTACK EUID FUNCNAME GROUPS PIPESTATUS PPID SHELLOPTS UID" local filtered_sandbox_vars="SANDBOX_ACTIVE SANDBOX_BASHRC SANDBOX_DEBUG_LOG SANDBOX_DISABLED SANDBOX_LIB SANDBOX_LOG SANDBOX_ON" filtered_vars="${readonly_bash_vars} ${READONLY_PORTAGE_VARS} - BASH_[_[:alnum:]]* PATH - [[:digit:]][_[:alnum:]]* - [^=[:space:]]*[^_[:alnum:]=[:space:]][^=[:space:]]*" + BASH_.* PATH" if hasq --filter-sandbox $* ; then - filtered_vars="${filtered_vars} SANDBOX_[_[:alnum:]]*" + filtered_vars="${filtered_vars} SANDBOX_.*" else filtered_vars="${filtered_vars} ${filtered_sandbox_vars}" fi @@ -1437,20 +1435,8 @@ filter_readonly_variables() { ${PORTAGE_MUTABLE_FILTERED_VARS} " fi - set -f - for x in ${filtered_vars} ; do - var_grep="${var_grep}|${x}" - done - set +f - var_grep=${var_grep:1} # strip the first | - var_grep="(^|^declare[[:space:]]+-[^[:space:]]+[[:space:]]+|^export[[:space:]]+)(${var_grep})=.*" - # The sed is to remove the readonly attribute from variables such as those - # listed in READONLY_EBUILD_METADATA, since having any readonly attributes - # persisting in the saved environment can be inconvenient when it - # eventually needs to be reloaded. - "${PORTAGE_BIN_PATH}"/filter-bash-environment.py "${var_grep}" | sed -r \ - -e 's:^declare[[:space:]]+-r[[:space:]]+:declare :' \ - -e 's:^declare[[:space:]]+-([[:alnum:]]*)r([[:alnum:]]*)[[:space:]]+:declare -\1\2 :' + + "${PORTAGE_BIN_PATH}"/filter-bash-environment.py "${filtered_vars}" } # @FUNCTION: preprocess_ebuild_env |