diff options
author | Mike Pagano <mpagano@gentoo.org> | 2017-08-31 14:08:31 -0400 |
---|---|---|
committer | Mike Pagano <mpagano@gentoo.org> | 2017-08-31 14:08:40 -0400 |
commit | 949dc375bdf94195c44698fe3479bd39669bcbb1 (patch) | |
tree | 5784622bac180ed59f450f19e9698991d37caf0b /eclass/kernel-2.eclass | |
parent | net-analyzer/cacti: Old. (diff) | |
download | gentoo-949dc375bdf94195c44698fe3479bd39669bcbb1.tar.gz gentoo-949dc375bdf94195c44698fe3479bd39669bcbb1.tar.bz2 gentoo-949dc375bdf94195c44698fe3479bd39669bcbb1.zip |
eclass/kernel-2.eclass: As per PMS remove calls to external command 'tr' in global scope. Closes bug 629106.
Diffstat (limited to 'eclass/kernel-2.eclass')
-rw-r--r-- | eclass/kernel-2.eclass | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass index 09409ab1ff10..84909f30ca32 100644 --- a/eclass/kernel-2.eclass +++ b/eclass/kernel-2.eclass @@ -1410,7 +1410,7 @@ getfilevar() { detect_arch() { - local ALL_ARCH LOOP_ARCH COMPAT_URI i + local ALL_ARCH LOOP_ARCH LOOP_ARCH_L COMPAT_URI i TC_ARCH_KERNEL # COMPAT_URI is the contents of ${ARCH}_URI # ARCH_URI is the URI for all the ${ARCH}_URI patches @@ -1418,20 +1418,25 @@ detect_arch() { ARCH_URI="" ARCH_PATCH="" + TC_ARCH_KERNEL="" ALL_ARCH="ALPHA AMD64 ARM HPPA IA64 M68K MIPS PPC PPC64 S390 SH SPARC X86" for LOOP_ARCH in ${ALL_ARCH}; do COMPAT_URI="${LOOP_ARCH}_URI" COMPAT_URI="${!COMPAT_URI}" + declare -l LOOP_ARCH_L=${LOOP_ARCH} + [[ -n ${COMPAT_URI} ]] && \ - ARCH_URI="${ARCH_URI} $(echo ${LOOP_ARCH} | tr '[:upper:]' '[:lower:]')? ( ${COMPAT_URI} )" + ARCH_URI="${ARCH_URI} ${LOOP_ARCH_L}? ( ${COMPAT_URI} )" - if [[ ${LOOP_ARCH} == "$(echo $(tc-arch-kernel) | tr '[:lower:]' '[:upper:]')" ]]; then + declare -u TC_ARCH_KERNEL=$(tc-arch-kernel) + if [[ ${LOOP_ARCH} == ${TC_ARCH_KERNEL} ]]; then for i in ${COMPAT_URI}; do ARCH_PATCH="${ARCH_PATCH} ${DISTDIR}/${i/*\//}" done fi + done } |