From: Simon Stelling Date: Mon, 1 May 2006 22:41:19 +0000 (-0000) Subject: don't let profile.env overwrite variables that are already set; bug 130229 X-Git-Tag: v2.1_rc1~41 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6312a9476d03a460b8f944b988f1c6838344ce0d;p=portage.git don't let profile.env overwrite variables that are already set; bug 130229 svn path=/main/trunk/; revision=3300 --- diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 1453827cf..e1851da04 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -44,7 +44,12 @@ alias restore_IFS='if [ "${old_IFS:-unset}" != "unset" ]; then IFS="${old_IFS}"; OCC="$CC" OCXX="$CXX" + +env_dump=$(export -p | egrep -v "( EBUILD_PHASE=| PORTAGE_BIN_PATH=| PORTAGE_PYM_PATH=)") source /etc/profile.env &>/dev/null +eval "${env_dump}" +unset env_dump + if [ -f "${PORTAGE_BASHRC}" ]; then # If $- contains x, then tracing has already enabled elsewhere for some # reason. We preserve it's state so as not to interfere.