From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id C6C851384B4 for ; Thu, 12 Nov 2015 19:32:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3847521C0B4; Thu, 12 Nov 2015 19:32:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C2D9121C0B4 for ; Thu, 12 Nov 2015 19:32:50 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 12D49340666 for ; Thu, 12 Nov 2015 19:32:50 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CE1DA23BD for ; Thu, 12 Nov 2015 19:32:46 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1447356757.c7b5c849905a00774bd4957e14b49cfe0e6ceafd.mgorny@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/phase-helpers.sh X-VCS-Directories: bin/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: c7b5c849905a00774bd4957e14b49cfe0e6ceafd X-VCS-Branch: master Date: Thu, 12 Nov 2015 19:32:46 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 0cf0aa27-f5bb-4407-8bbe-ad8245627853 X-Archives-Hash: e1663ea10a80d19bc4fc00b5161860db commit: c7b5c849905a00774bd4957e14b49cfe0e6ceafd Author: Michał Górny gentoo org> AuthorDate: Mon Nov 9 17:39:47 2015 +0000 Commit: Michał Górny gentoo org> CommitDate: Thu Nov 12 19:32:37 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=c7b5c849 eapply: Pass exit status through on non-fatal failures bin/phase-helpers.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh index 511a41a..7e5dbbc 100644 --- a/bin/phase-helpers.sh +++ b/bin/phase-helpers.sh @@ -981,6 +981,8 @@ fi if ___eapi_has_eapply; then eapply() { + local failed + _eapply_patch() { local f=${1} local prefix=${2} @@ -994,9 +996,9 @@ if ___eapi_has_eapply; then # --no-backup-if-mismatch not to pollute the sources patch -p1 -f -s -g0 --no-backup-if-mismatch \ "${patch_options[@]}" < "${f}" - if ! eend ${?}; then + failed=${?} + if ! eend "${failed}"; then __helpers_die "patch -p1 ${patch_options[*]} failed with ${f}" - failed=1 fi } @@ -1054,13 +1056,13 @@ if ___eapi_has_eapply; then _eapply_patch "${f2}" ' ' # in case of nonfatal - [[ -n ${failed} ]] && return 1 + [[ ${failed} -ne 0 ]] && return "${failed}" done else _eapply_patch "${f}" # in case of nonfatal - [[ -n ${failed} ]] && return 1 + [[ ${failed} -ne 0 ]] && return "${failed}" fi done