Skip to content

Commit

Permalink
eclass/kernel-2.eclass: As per PMS remove calls to external command '…
Browse files Browse the repository at this point in the history
…tr' in global scope. Closes bug 629106.
  • Loading branch information
mpagano committed Aug 31, 2017
1 parent e03d244 commit 949dc37
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions eclass/kernel-2.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -1410,28 +1410,33 @@ 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
# ARCH_PATCH is ARCH_URI broken into files for UNIPATCH

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
}

Expand Down

0 comments on commit 949dc37

Please sign in to comment.