commit:     a144739b575c9be9c57afbe3d3ae9a52e9872b57
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 14 21:45:45 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Nov 14 22:13:03 2015 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=a144739b

__eapi6_src_prepare: Silence 'declare -p PATCHES' errors

Silence the error message when PATCHES array is not declared.

Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>

 bin/phase-helpers.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index 3e619dc..6c45c25 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -805,7 +805,7 @@ __eapi4_src_install() {
 }
 
 __eapi6_src_prepare() {
-       if [[ $(declare -p PATCHES) == "declare -a"* ]]; then
+       if [[ $(declare -p PATCHES 2>/dev/null) == "declare -a"* ]]; then
                eapply "${PATCHES[@]}"
        elif [[ -n ${PATCHES} ]]; then
                eapply ${PATCHES}

Reply via email to