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 5/6] Apply 'nonfatal' to helpers only
Date: Mon, 18 Aug 2014 17:51:30
Message-Id: 1408384301-14588-6-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCHES] Random issues and refactoring before EAPI6 series by "Michał Górny"
1 Make 'nonfatal' modifier affect helpers only rather than disabling 'die'
2 completely. This improves the PMS conformance.
3 ---
4 bin/isolated-functions.sh | 7 +------
5 1 file changed, 1 insertion(+), 6 deletions(-)
6
7 diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
8 index a22af57..d41f0b3 100644
9 --- a/bin/isolated-functions.sh
10 +++ b/bin/isolated-functions.sh
11 @@ -106,7 +106,7 @@ __bashpid() {
12 }
13
14 __helpers_die() {
15 - if ___eapi_helpers_can_die; then
16 + if ___eapi_helpers_can_die && [[ ${PORTAGE_NONFATAL} != 1 ]]; then
17 die "$@"
18 else
19 echo -e "$@" >&2
20 @@ -116,11 +116,6 @@ __helpers_die() {
21 die() {
22 local IFS=$' \t\n'
23
24 - if [[ $PORTAGE_NONFATAL -eq 1 ]]; then
25 - echo -e " $WARN*$NORMAL ${FUNCNAME[1]}: WARNING: $@" >&2
26 - return 1
27 - fi
28 -
29 set +e
30 if [ -n "${QA_INTERCEPTORS}" ] ; then
31 # die was called from inside inherit. We need to clean up
32 --
33 2.0.4