From 2e650b0eda2f7efe25d4f7d2f3494ded4a96ed6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bo=20=C3=98rsted=20Andresen?= Date: Sat, 6 Mar 2010 11:35:34 +0000 Subject: Enable extglob in exheres-0 only. ebuild_need_extglob is needed early in ebuild.bash. It is also needed in source_functions because that gets loaded by write_binary_ebuild.bash and write_vdb_entry.bash. extglob gets enabled when PALUDIS_SHELL_OPTIONS is unset to make sure things keep working on exheres-0 with old paludis and new ebuild.bash. This is only to keep a clean upgrade path. --- paludis/repositories/e/ebuild/source_functions.bash | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'paludis/repositories/e/ebuild/source_functions.bash') diff --git a/paludis/repositories/e/ebuild/source_functions.bash b/paludis/repositories/e/ebuild/source_functions.bash index 92f9541ec..f3f91b7cf 100755 --- a/paludis/repositories/e/ebuild/source_functions.bash +++ b/paludis/repositories/e/ebuild/source_functions.bash @@ -20,6 +20,20 @@ # this program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place, Suite 330, Boston, MA 02111-1307 USA +ebuild_need_extglob() +{ + eval "_ebuild_need_extglob_$(declare -f ${1})" + eval " + ${1}() + { + eval \" + shopt -s extglob + _ebuild_need_extglob_${1} \\\"\\\${@}\\\" + eval \\\"\$(shopt -p extglob); return \\\${?}\\\" + \" + }" +} + ebuild_safe_source() { set -- "${@}" '[^a-zA-Z_]*' '*[^a-zA-Z0-9_]*' \ @@ -38,6 +52,7 @@ ebuild_safe_source() source "${1}" eval "trap DEBUG; shopt -u extdebug; set +T; return ${?}" } +ebuild_need_extglob ebuild_safe_source ebuild_verify_not_changed_from_global_scope() { -- cgit v1.2.3