Gentoo Archives: gentoo-portage-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-portage-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-portage-dev] [PATCH] __eapi6_src_prepare: Silence 'declare -p PATCHES' errors
Date: Sat, 14 Nov 2015 21:46:21
Message-Id: 1447537570-24089-1-git-send-email-mgorny@gentoo.org
1 Silence the error message when PATCHES array is not declared.
2 ---
3 bin/phase-helpers.sh | 2 +-
4 1 file changed, 1 insertion(+), 1 deletion(-)
5
6 diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
7 index 3e619dc..6c45c25 100644
8 --- a/bin/phase-helpers.sh
9 +++ b/bin/phase-helpers.sh
10 @@ -805,7 +805,7 @@ __eapi4_src_install() {
11 }
12
13 __eapi6_src_prepare() {
14 - if [[ $(declare -p PATCHES) == "declare -a"* ]]; then
15 + if [[ $(declare -p PATCHES 2>/dev/null) == "declare -a"* ]]; then
16 eapply "${PATCHES[@]}"
17 elif [[ -n ${PATCHES} ]]; then
18 eapply ${PATCHES}
19 --
20 2.6.3

Replies