diff options
author | 2008-03-01 15:11:35 +0000 | |
---|---|---|
committer | 2008-03-01 15:11:35 +0000 | |
commit | 30e3fa2bb75ffc08b0b39a52d742053d080ae509 (patch) | |
tree | 43ccbd3cd46507b39624e5825875c7c052851e74 /paludis | |
parent | 6f64586efde03d944d81d028093e165d3a2408fb (diff) | |
download | paludis-30e3fa2bb75ffc08b0b39a52d742053d080ae509.tar.gz paludis-30e3fa2bb75ffc08b0b39a52d742053d080ae509.tar.xz |
Filter out variables with names that bash doesn't like. See: gentoo#211949
Diffstat (limited to 'paludis')
-rwxr-xr-x | paludis/repositories/e/ebuild/ebuild.bash | 1 | ||||
-rwxr-xr-x | paludis/repositories/e/ebuild/source_functions.bash | 10 |
2 files changed, 6 insertions, 5 deletions
diff --git a/paludis/repositories/e/ebuild/ebuild.bash b/paludis/repositories/e/ebuild/ebuild.bash index a5714276a..5d46a7790 100755 --- a/paludis/repositories/e/ebuild/ebuild.bash +++ b/paludis/repositories/e/ebuild/ebuild.bash @@ -26,6 +26,7 @@ unalias -a set +C unset GZIP BZIP BZIP2 CDPATH GREP_OPTIONS GREP_COLOR GLOBIGNORE eval unset LANG ${!LC_*} +export LC_ALL=C # The list below should include all variables from all EAPIs EBUILD_METADATA_VARIABLES="DEPEND RDEPEND PDEPEND IUSE SRC_URI RESTRICT \ diff --git a/paludis/repositories/e/ebuild/source_functions.bash b/paludis/repositories/e/ebuild/source_functions.bash index a22b23a55..309a7574d 100755 --- a/paludis/repositories/e/ebuild/source_functions.bash +++ b/paludis/repositories/e/ebuild/source_functions.bash @@ -1,7 +1,7 @@ #!/bin/bash # vim: set sw=4 sts=4 et : -# Copyright (c) 2007 David Leverton +# Copyright (c) 2007, 2008 David Leverton # # Based in part upon ebuild.sh from Portage, which is Copyright 1995-2005 # Gentoo Foundation and distributed under the terms of the GNU General @@ -22,7 +22,7 @@ ebuild_safe_source() { - set -- "${@}" \ + set -- "${@}" '[^a-zA-Z_]*' '*[^a-zA-Z0-9_]*' \ EUID PPID UID FUNCNAME GROUPS SHELLOPTS \ 'BASH_@(ARGC|ARGV|LINENO|SOURCE|VERSINFO|REMATCH)' \ 'BASH_COMPLETION?(_DIR)' 'bash+([0-9])?([a-z])' \ @@ -32,9 +32,9 @@ ebuild_safe_source() trap DEBUG set -T shopt -s extdebug - trap "[[ \${BASH_COMMAND%% *} == @(eval|trap) || - ( \${BASH_COMMAND} != *([^\$'\n'])=* && \${BASH_COMMAND} != export\ * ) || - \${BASH_COMMAND} != ?(export\ |declare\ ?(+([^\ ])\ ))@($(IFS='|'; shift; echo "${*}"))?(=*) ]]" DEBUG + trap "[[ \${BASH_COMMAND%%[[:space:]]*} == @(eval|trap) || + ( \${BASH_COMMAND} != *([^\$'\n'])=* && \${BASH_COMMAND%%[[:space:]]*} != @(export|declare) ) || + \${BASH_COMMAND} == ?(*([^=])[[:space:]])!($(IFS='|'; shift; echo "${*}"))?(=*) ]]" DEBUG source "${1}" eval "trap DEBUG; shopt -u extdebug; set +T; return ${?}" |