From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-portage-dev+bounces-3753-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id EEDCE13877A
	for <garchives@archives.gentoo.org>; Mon, 18 Aug 2014 17:51:30 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 7F917E0B34;
	Mon, 18 Aug 2014 17:51:05 +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 F3552E0B29
	for <gentoo-portage-dev@lists.gentoo.org>; Mon, 18 Aug 2014 17:51:04 +0000 (UTC)
Received: from pomiot.lan (77-253-136-53.adsl.inetia.pl [77.253.136.53])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits))
	(No client certificate requested)
	(Authenticated sender: mgorny)
	by smtp.gentoo.org (Postfix) with ESMTPSA id 6108234015D;
	Mon, 18 Aug 2014 17:51:03 +0000 (UTC)
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Subject: [gentoo-portage-dev] [PATCH 5/6] Apply 'nonfatal' to helpers only
Date: Mon, 18 Aug 2014 19:51:40 +0200
Message-Id: <1408384301-14588-6-git-send-email-mgorny@gentoo.org>
X-Mailer: git-send-email 2.0.4
In-Reply-To: <1408384301-14588-1-git-send-email-mgorny@gentoo.org>
References: <1408384301-14588-1-git-send-email-mgorny@gentoo.org>
Precedence: bulk
List-Post: <mailto:gentoo-portage-dev@lists.gentoo.org>
List-Help: <mailto:gentoo-portage-dev+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-portage-dev+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-portage-dev+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-portage-dev.gentoo.org>
X-BeenThere: gentoo-portage-dev@lists.gentoo.org
Reply-to: gentoo-portage-dev@lists.gentoo.org
X-Archives-Salt: 68319c8c-95a7-4335-bdc6-c918ba771892
X-Archives-Hash: f209dd6ea61d84f3dfbaa4e4a6a5587f

Make 'nonfatal' modifier affect helpers only rather than disabling 'die'
completely. This improves the PMS conformance.
---
 bin/isolated-functions.sh | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index a22af57..d41f0b3 100644
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -106,7 +106,7 @@ __bashpid() {
 }
 
 __helpers_die() {
-	if ___eapi_helpers_can_die; then
+	if ___eapi_helpers_can_die && [[ ${PORTAGE_NONFATAL} != 1 ]]; then
 		die "$@"
 	else
 		echo -e "$@" >&2
@@ -116,11 +116,6 @@ __helpers_die() {
 die() {
 	local IFS=$' \t\n'
 
-	if [[ $PORTAGE_NONFATAL -eq 1 ]]; then
-		echo -e " $WARN*$NORMAL ${FUNCNAME[1]}: WARNING: $@" >&2
-		return 1
-	fi
-
 	set +e
 	if [ -n "${QA_INTERCEPTORS}" ] ; then
 		# die was called from inside inherit. We need to clean up
-- 
2.0.4