summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-11-21 07:38:24 +0000
committerZac Medico <zmedico@gentoo.org>2007-11-21 07:38:24 +0000
commitff6f87572a496c0d7e969e4db16e7f755a954a74 (patch)
tree4563c070cb6220cc7b6d2608896b2c804ee51585 /bin
parent568d2bee8c43fbf126817696532d9a8200fe9930 (diff)
downloadportage-ff6f87572a496c0d7e969e4db16e7f755a954a74.tar.gz
portage-ff6f87572a496c0d7e969e4db16e7f755a954a74.tar.bz2
portage-ff6f87572a496c0d7e969e4db16e7f755a954a74.zip
Clean up some local variables that are needlessly saved
in the environment. svn path=/main/trunk/; revision=8573
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ebuild.sh8
1 files changed, 6 insertions, 2 deletions
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