summaryrefslogtreecommitdiffstats
path: root/bin/ebuild.sh
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-12-13 05:54:49 +0000
committerZac Medico <zmedico@gentoo.org>2007-12-13 05:54:49 +0000
commit78fb2c22e9b81dd5cd2e0d35a1d7d8960bc363e7 (patch)
tree3092c12edac23c3c087dcea1942f0c8a107af988 /bin/ebuild.sh
parentfcc332a75cf153b9912bc4b26f1d4f028daa7ff3 (diff)
downloadportage-78fb2c22e9b81dd5cd2e0d35a1d7d8960bc363e7.tar.gz
portage-78fb2c22e9b81dd5cd2e0d35a1d7d8960bc363e7.tar.bz2
portage-78fb2c22e9b81dd5cd2e0d35a1d7d8960bc363e7.zip
* 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
Diffstat (limited to 'bin/ebuild.sh')
-rwxr-xr-xbin/ebuild.sh6
1 files changed, 3 insertions, 3 deletions
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