commit:     485a3ff72b300594b01f81a871059746a236e6ba
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Sun Jun  1 02:52:53 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun  1 21:42:03 2025 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=485a3ff7

Eliminate all remaining uses of ___is_indexed_array_var()

Adjust the following three functions so as to use the ${param@a} form of
expansion in the course of determining whether a given variable is an
indexed array.

__eapi4_src_install
__eapi6_src_prepare
__eapi8_src_prepare

Doing so is acceptable, given a target of >=bash-4.4.

Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 bin/phase-helpers.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index b07bb42b3c..2aa84b0a9a 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -792,7 +792,7 @@ __eapi4_src_install() {
                                THANKS BUGS FAQ CREDITS CHANGELOG ; do
                        [[ -s "${d}" ]] && dodoc "${d}"
                done
-       elif ___is_indexed_array_var DOCS ; then
+       elif [[ ${DOCS@a} == *a* ]] ; then
                dodoc "${DOCS[@]}"
        else
                dodoc ${DOCS}
@@ -800,7 +800,7 @@ __eapi4_src_install() {
 }
 
 __eapi6_src_prepare() {
-       if ___is_indexed_array_var PATCHES ; then
+       if [[ ${PATCHES@a} == *a* ]] ; then
                [[ ${#PATCHES[@]} -gt 0 ]] && eapply "${PATCHES[@]}"
        elif [[ -n ${PATCHES} ]]; then
                eapply ${PATCHES}
@@ -819,7 +819,7 @@ __eapi6_src_install() {
 
 __eapi8_src_prepare() {
        local f
-       if ___is_indexed_array_var PATCHES ; then
+       if [[ ${PATCHES@a} == *a* ]] ; then
                [[ ${#PATCHES[@]} -gt 0 ]] && eapply -- "${PATCHES[@]}"
        elif [[ -n ${PATCHES} ]]; then
                eapply -- ${PATCHES}

Reply via email to