Gentoo Archives: gentoo-dev

From: Michael Haubenwallner <haubi@g.o>
To: gentoo-dev@l.g.o
Cc: Michael Haubenwallner <haubi@g.o>
Subject: [gentoo-dev] [PATCH] toolchain.eclass (do_gcc_CYGWINPORTS_patches): avoid bash-4.4ism
Date: Thu, 08 Aug 2019 10:53:58
Message-Id: 20190808105337.19606-1-haubi@gentoo.org
1 Closes: https://bugs.gentoo.org/690686
2 ---
3 eclass/toolchain.eclass | 4 ++--
4 1 file changed, 2 insertions(+), 2 deletions(-)
5
6 diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
7 index 6bc04b4cbfe..40d46ed0707 100644
8 --- a/eclass/toolchain.eclass
9 +++ b/eclass/toolchain.eclass
10 @@ -687,9 +687,9 @@ do_gcc_CYGWINPORTS_patches() {
11 [[ -n ${CYGWINPORTS_GITREV} ]] || return 0
12 use elibc_Cygwin || return 0
13
14 - local -a patches
15 local p d="${WORKDIR}/gcc-${CYGWINPORTS_GITREV}"
16 - readarray -t patches < <(sed -e '1,/PATCH_URI="/d;/"/,$d' < "${d}"/gcc.cygport)
17 + # readarray -t is available since bash-4.4 only, #690686
18 + local patches=( $(sed -e '1,/PATCH_URI="/d;/"/,$d' < "${d}"/gcc.cygport) )
19 for p in ${patches[*]}; do
20 epatch "${d}/${p}"
21 done
22 --
23 2.21.0

Replies