commit:     859ce0c18b826cf3e89cab76661723ef7b11b420
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 18 08:39:29 2014 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Dec  4 14:01:34 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=859ce0c1

Apply 'nonfatal' to helpers only

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 ed96bd0..251d7ee 100644
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -113,7 +113,7 @@ __bashpid() {
 }
 
 __helpers_die() {
-       if ___eapi_helpers_can_die; then
+       if ___eapi_helpers_can_die && [[ ${PORTAGE_NONFATAL} != 1 ]]; then
                die "$@"
        else
                echo -e "$@" >&2
@@ -123,11 +123,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

Reply via email to