>>>>> On Thu, 31 Aug 2017, Michał Górny wrote:
>> > @@ -1425,9 +1426,10 @@ detect_arch() {
>> > COMPAT_URI="${!COMPAT_URI}"
>> >
>> > [[ -n ${COMPAT_URI} ]] && \
>> > - ARCH_URI="${ARCH_URI} $(echo ${LOOP_ARCH} | tr '[:upper:]'
>> > '[:lower:]')? ( ${COMPAT_URI} )"
>> > + ARCH_URI="${ARCH_URI} ${LOOP_ARCH,,}? ( ${COMPAT_URI} )"
>> >
>> > - if [[ ${LOOP_ARCH} == "$(echo $(tc-arch-kernel) | tr '[:lower:]'
>> > '[:upper:]')" ]]; then
>> > + TC_ARCH_KERNEL=$(tc-arch-kernel);
>> > + if [[ ${LOOP_ARCH} == ${TC_ARCH_KERNEL^^} ]]; then
>> >
>> >
>>
>> Unfortunately, the ${VAR,,} and ${VAR^^} forms were added in bash
>> 4.0 [1], which means they are not available in EAPIs before 6,
>> which only allow constructs from bash 3.2 [2].
>>
>> [1]: https://tiswww.case.edu/php/chet/bash/NEWS
>> [2]: https://projects.gentoo.org/pms/6/pms.html#x1-640006> That's what I wanted to say. However, considering it's broken > anyway, I guess this is kind of improvement (since it technically > breaks old ebuilds only). Many kernel ebuilds are still at EAPI 5, though. > As a cheap alternative, you could just do a big 'case' with > hardcoded mappings. Or given that ALL_ARCH is already defined, you > can define ALL_ARCH_LC (lowercase) and map from one to the other. There is also "shopt -s nocasematch" which is available since bash 3.1. Ulrich
pgp_OCXtvqzOu.pgp
Description: PGP signature
