Gentoo Archives: gentoo-portage-dev

From: Ulrich Mueller <ulm@g.o>
To: gentoo-portage-dev@l.g.o
Cc: Zac Medico <zmedico@g.o>
Subject: [gentoo-portage-dev] [PATCH] __eapi6_src_prepare: handle empty PATCHES array (bug 579626)
Date: Wed, 20 Apr 2016 20:46:39
Message-Id: 22295.60069.523802.191191@a1i15.kph.uni-mainz.de
In Reply to: [gentoo-portage-dev] [PATCH] __eapi6_src_prepare: handle empty PATCHES array (bug 579626) by Zac Medico
1 >>>>> On Wed, 20 Apr 2016, Zac Medico wrote:
2
3 > Only call eapply with a non-empty PATCHES array, as specified by PMS.
4 > X-Gentoo-bug: 579626
5 > X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=579626
6 > ---
7 > bin/phase-helpers.sh | 2 +-
8 > 1 file changed, 1 insertion(+), 1 deletion(-)
9 >
10 > diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
11 > index 1a9ee7b..5af2784 100644
12 > --- a/bin/phase-helpers.sh
13 > +++ b/bin/phase-helpers.sh
14 > @@ -806,7 +806,7 @@ __eapi4_src_install() {
15 >
16 > __eapi6_src_prepare() {
17 > if [[ $(declare -p PATCHES 2>/dev/null) == "declare -a"* ]]; then
18 > - eapply "${PATCHES[@]}"
19 > + [[ -n ${PATCHES[@]} ]] && eapply "${PATCHES[@]}"
20 > elif [[ -n ${PATCHES} ]]; then
21 > eapply ${PATCHES}
22 > fi
23 > --
24 > 2.7.4
25
26 Looks good to me. The spec explicitly checks for this condition too.
27
28 Ulrich