From 78fb2c22e9b81dd5cd2e0d35a1d7d8960bc363e7 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 13 Dec 2007 05:54:49 +0000 Subject: * In filter_readonly_variables(), replace 'declare -r ' with 'declare ' instead of removing it completely. * Bug #202068 - In order to filter unwanted variable assignments out of the bash environment, use a filter-bash-environment.py script that behaves similar to egrep -v except that it leaves bash here- documents intact. * Use the sed -r option to enable extended regular expressions so that commonly used characters like (, ), and + don't have to be escaped. (trunk r8890:8893) svn path=/main/branches/2.1.2/; revision=8899 --- bin/ebuild.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bin/ebuild.sh') diff --git a/bin/ebuild.sh b/bin/ebuild.sh index fbccce70c..50222eb6e 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -1425,9 +1425,9 @@ filter_readonly_variables() { # 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. - egrep -v -e "${var_grep}" | sed \ - -e 's:^declare[[:space:]]\+-r[[:space:]]\+::' \ - -e 's:^declare[[:space:]]\+-\([[:alnum:]]*\)r\([[:alnum:]]*\)[[:space:]]\+:declare -\1\2 :' + "${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 :' } # @FUNCTION: preprocess_ebuild_env -- cgit v1.2.3-1-g7c22