From 6b9be2d94b4d9478246d3d40c5479977f9230ca1 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 11 Apr 2009 03:34:19 +0000 Subject: Avoid leaking some variables from ebuild_main() into the environment (local variables are exposed to 'children'). svn path=/main/trunk/; revision=13316 --- bin/ebuild.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/ebuild.sh b/bin/ebuild.sh index c086e6d31..8fad20b87 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -1901,8 +1901,6 @@ fi ebuild_main() { local f x - local export_vars="ASFLAGS CCACHE_DIR CCACHE_SIZE - CFLAGS CXXFLAGS LDFLAGS LIBCFLAGS LIBCXXFLAGS" if ! hasq $EBUILD_SH_ARGS clean depend help info nofetch ; then @@ -1931,6 +1929,7 @@ ebuild_main() { if [[ $EBUILD_PHASE != depend ]] ; then local phase_func=$(_ebuild_arg_to_phase "$EAPI" "$EBUILD_PHASE") [[ -n $phase_func ]] && _ebuild_phase_funcs "$EAPI" "$phase_func" + unset phase_func fi source_all_bashrcs @@ -1971,7 +1970,8 @@ ebuild_main() { case "$EBUILD_SH_ARGS" in configure|compile) - for x in $export_vars ; do + for x in ASFLAGS CCACHE_DIR CCACHE_SIZE \ + CFLAGS CXXFLAGS LDFLAGS LIBCFLAGS LIBCXXFLAGS ; do [[ ${!x-unset} != unset ]] && export $x done -- cgit v1.2.3-1-g7c22