aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2009-08-11 21:59:02 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2009-08-11 21:59:02 +0100
commit248022407f90dfdb97548c61ecb6ff211005b946 (patch)
tree4112abc4321b57ad561949137eb8da387c0d0012
parentd6b81fa7c7ba1197162306add42db172464e7d4e (diff)
downloadpaludis-248022407f90dfdb97548c61ecb6ff211005b946.tar.gz
paludis-248022407f90dfdb97548c61ecb6ff211005b946.tar.xz
Don't hardcode list of functions to filter out
Assume that everything that's already defined by this point should be filtered. It's conceivable that there might be some exceptions required, but we'll add those if and when we find them.
-rwxr-xr-xpaludis/repositories/e/ebuild/ebuild.bash12
1 files changed, 8 insertions, 4 deletions
diff --git a/paludis/repositories/e/ebuild/ebuild.bash b/paludis/repositories/e/ebuild/ebuild.bash
index bc8d522..6140d89 100755
--- a/paludis/repositories/e/ebuild/ebuild.bash
+++ b/paludis/repositories/e/ebuild/ebuild.bash
@@ -210,13 +210,17 @@ ebuild_source_profile()
ebuild_scrub_environment()
{
+ local paludis_declared_functions
+ paludis_declared_functions=$(declare -F | while read paludis_v ; do
+ echo -n ${paludis_v#declare -f } " "
+ done )
+
(
ebuild_safe_source "${1}" PATH PALUDIS_SOURCE_MERGED_VARIABLES \
- PALUDIS_BRACKET_MERGED_VARIABLES LD_LIBRARY_PATH || exit 1
+ PALUDIS_BRACKET_MERGED_VARIABLES LD_LIBRARY_PATH paludis_declared_functions || exit 1
- unset -f diefunc perform_hook inherit builtin_loadenv builtin_saveenv
- unset -f ebuild_safe_source portageq best_version has_version paludis_pipe_command
- unset -f paludis_rewrite_var default
+ unset -f ${paludis_declared_functions}
+ unset -v paludis_declared_functions
if [[ "${2}" == "--pivot" ]] ; then
unset -f ${PALUDIS_IGNORE_PIVOT_ENV_FUNCTIONS}