From 2e2f8d584055083185689c5ec4c5ce39e201cf38 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 20 Nov 2007 02:33:28 +0000 Subject: Now that save_ebuild_env() filters variables that could cause interference, preprocess_ebuild_env() can rely on it to clean up the environment enough so that anything left can be allowed to override variables or functions from the current environment. svn path=/main/trunk/; revision=8537 --- bin/ebuild.sh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'bin') diff --git a/bin/ebuild.sh b/bin/ebuild.sh index aaaf28826..505acbd92 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -1381,22 +1381,15 @@ filter_readonly_variables() { # any stale variables or functions from an arbitrary environment from # interfering with the current environment. This is useful when an existing # environment needs to be loaded from a binary or installed package. -# -# For simplicity, the current implementation will cause the current environment -# to override *everything* in the environment that is being processed. In the -# future, it should be more selective and only override the parts that are -# strictly necessary. preprocess_ebuild_env() { filter_readonly_variables < "${T}"/environment > "${T}"/environment.filtered mv "${T}"/environment.filtered "${T}"/environment - save_ebuild_env > "${T}"/environment.baseline ( source "${T}"/environment - unset FEATURES - source "${T}"/environment.baseline + # Rely on save_ebuild_env() to filter out any remaining variables + # and functions that could interfere with the current environment. save_ebuild_env > "${T}"/environment ) - rm "${T}"/environment.baseline } # @FUNCTION: save_ebuild_env -- cgit v1.2.3-1-g7c22