From d184c0f32eba2eec3a8d28ae71be79aa635db147 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 2 Sep 2012 15:56:46 -0700 Subject: Quote ${EAPI} more. This will avoid a potential syntax error in save-ebuild-env.sh if a saved environment containing corrupt EAPI is sourced. --- bin/ebuild-helpers/doheader | 2 +- bin/ebuild-helpers/newins | 2 +- bin/phase-functions.sh | 6 +++--- bin/phase-helpers.sh | 2 +- bin/save-ebuild-env.sh | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'bin') diff --git a/bin/ebuild-helpers/doheader b/bin/ebuild-helpers/doheader index 9bbe5bc29..c51ec1ed9 100755 --- a/bin/ebuild-helpers/doheader +++ b/bin/ebuild-helpers/doheader @@ -4,7 +4,7 @@ source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh -case ${EAPI} in +case "${EAPI}" in 0|1|2|3|4|4-python|4-slot-abi) die "${0##*/} is not supported in EAPI ${EAPI}" ;; diff --git a/bin/ebuild-helpers/newins b/bin/ebuild-helpers/newins index 2dc041d15..54245f3bc 100755 --- a/bin/ebuild-helpers/newins +++ b/bin/ebuild-helpers/newins @@ -15,7 +15,7 @@ fi eqawarn "QA Notice: ${helper} called with more than 2 arguments: ${@:3}" stdin= -case ${EAPI} in +case "${EAPI}" in 0|1|2|3|4|4-python|4-slot-abi) ;; *) [[ $1 = "-" ]] && stdin=yes ;; esac diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh index fd7fb25b9..68a33a871 100644 --- a/bin/phase-functions.sh +++ b/bin/phase-functions.sh @@ -755,12 +755,12 @@ _ebuild_phase_funcs() { eval "$x() { _eapi0_$x \"\$@\" ; }" done - case $eapi in + case "$eapi" in 0|1) if ! declare -F src_compile >/dev/null ; then - case $eapi in + case "$eapi" in 0) src_compile() { _eapi0_src_compile "$@" ; } ;; @@ -807,7 +807,7 @@ _ebuild_phase_funcs() { eval "default() { _eapi2_$phase_func \"\$@\" ; }" - case $eapi in + case "$eapi" in 2|3) ;; *) diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh index 46f713211..0587991f9 100644 --- a/bin/phase-helpers.sh +++ b/bin/phase-helpers.sh @@ -174,7 +174,7 @@ usev() { return 1 } -case ${EAPI} in +case "${EAPI}" in 0|1|2|3|4|4-python|4-slot-abi) ;; *) usex() { diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh index 75e48437a..6d6ed41b6 100644 --- a/bin/save-ebuild-env.sh +++ b/bin/save-ebuild-env.sh @@ -73,7 +73,7 @@ save_ebuild_env() { _hasg _hasgq _unpack_tar \ ${QA_INTERCEPTORS} - case ${EAPI} in + case "${EAPI}" in 0|1|2|3|4|4-python|4-slot-abi) ;; *) unset -f usex ;; esac -- cgit v1.2.3-1-g7c22