From: Zac Medico Date: Wed, 21 Nov 2007 07:40:05 +0000 (-0000) Subject: Clean up some local variables that are needlessly saved X-Git-Tag: v2.1.4~252 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=41c8af4f2386acd78a71d25990205cc10dae2512;p=portage.git Clean up some local variables that are needlessly saved in the environment. (trunk r8573) svn path=/main/branches/2.1.2/; revision=8574 --- diff --git a/bin/ebuild.sh b/bin/ebuild.sh index ea871ee66..467554969 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -318,6 +318,7 @@ keepdir() { } unpack() { + local srcdir local x local y local myfail @@ -909,10 +910,10 @@ dyn_compile() { fi if [ -d "${S}" ]; then srcdir=${S} - cd "${S}" else - cd "${WORKDIR}" + srcdir=${WORKDIR} fi + cd "${srcdir}" #our custom version of libtool uses $S and $D to fix #invalid paths in .la files export S D @@ -928,6 +929,7 @@ dyn_compile() { cd build-info set -f + local f for f in ASFLAGS CATEGORY CBUILD CC CFLAGS CHOST CTARGET CXX \ CXXFLAGS DEPEND EXTRA_ECONF EXTRA_EINSTALL EXTRA_MAKE \ FEATURES INHERITED IUSE LDFLAGS LIBCFLAGS LIBCXXFLAGS \ @@ -939,6 +941,8 @@ dyn_compile() { echo "${EAPI:-0}" > EAPI set +f + # local variables can leak into the saved environment. + unset f srcdir save_ebuild_env > environment bzip2 -f9 environment