summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-01-12 01:35:08 +0000
committerZac Medico <zmedico@gentoo.org>2008-01-12 01:35:08 +0000
commita274e7f148d00d107ef05e2ecfbb8d62216de9bc (patch)
treeaf93a362977eb8efda019e734502378727efc602
parent2a3f083716ac0e0fd872cf29178dadefff96c089 (diff)
downloadportage-a274e7f148d00d107ef05e2ecfbb8d62216de9bc.tar.gz
portage-a274e7f148d00d107ef05e2ecfbb8d62216de9bc.tar.bz2
portage-a274e7f148d00d107ef05e2ecfbb8d62216de9bc.zip
In preprocess_ebuild_env(), move a filter_readonly_variables call
out of a subshell since FreeBSD and prefix users have reported apparent corruption of the PATH environment variable that triggers calls to the wrong version of sed (one that does not support the -r option). An example of what users have observed: >>> Source compiled. sed: illegal option -- r usage: sed script [-Ealn] [-i extension] [file ...] sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...] Traceback (most recent call last): File "/usr/lib/portage/bin/filter-bash-environment.py", line 51, in <module> compile_egrep_pattern(args[0]), file_in, file_out) File "/usr/lib/portage/bin/filter-bash-environment.py", line 34, in filter_bash_environment file_out.write(line) IOError: [Errno 32] Broken pipe svn path=/main/trunk/; revision=9194
-rwxr-xr-xbin/ebuild.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index ef21d222d..81ea96eb2 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -1486,10 +1486,11 @@ preprocess_ebuild_env() {
# and functions that could interfere with the current environment.
save_ebuild_env || exit $?
touch "${T}/environment.success" || exit $?
- ) | filter_readonly_variables > "${T}/environment.filtered"
+ ) > "${T}/environment.filtered"
local retval
if [ -e "${T}/environment.success" ] ; then
- mv "${T}/environment.filtered" "${T}/environment"
+ filter_readonly_variables < \
+ "${T}/environment.filtered" > "${T}/environment" || return $?
retval=$?
else
retval=1