Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Fri, 01 Jan 2021 19:18:21
Message-Id: 1609528658.b622a2ec935dd8d9e60a2c92bcbacc5e57f5e9c7.mpagano@gentoo
1 commit: b622a2ec935dd8d9e60a2c92bcbacc5e57f5e9c7
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 1 19:17:38 2021 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 1 19:17:38 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b622a2ec
7
8 kernel-2.eclass: Handle stricter bash 5.1 expansion rules
9
10 Set default value in the case that STRICT_COUNT is unset.
11 Thanks to jospezial for reporting
12
13 Closes: https://bugs.gentoo.org/762319
14
15 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
16
17 eclass/kernel-2.eclass | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-)
19
20 diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
21 index cad7307dc06..dccd39ec8f2 100644
22 --- a/eclass/kernel-2.eclass
23 +++ b/eclass/kernel-2.eclass
24 @@ -1158,7 +1158,7 @@ unipatch() {
25 if echo ${i} | grep -qs -e "\.tar" -e "\.tbz" -e "\.tgz" ; then
26 if [ -n "${UNIPATCH_STRICTORDER}" ]; then
27 unset z
28 - STRICT_COUNT=$((10#${STRICT_COUNT} + 1))
29 + STRICT_COUNT=$((10#${STRICT_COUNT:=0} + 1))
30 for((y=0; y<$((6 - ${#STRICT_COUNT})); y++));
31 do z="${z}0";
32 done
33 @@ -1207,7 +1207,7 @@ unipatch() {
34
35 if [ -n "${UNIPATCH_STRICTORDER}" ]; then
36 unset z
37 - STRICT_COUNT=$((10#${STRICT_COUNT} + 1))
38 + STRICT_COUNT=$((10#${STRICT_COUNT:=0} + 1))
39 for((y=0; y<$((6 - ${#STRICT_COUNT})); y++));
40 do z="${z}0";
41 done