From 65c1a6e0dddf0d99af7adbd41484150d5fc6ef9c Mon Sep 17 00:00:00 2001 From: Dror Levin Date: Wed, 26 May 2010 23:23:38 +0300 Subject: Make utilities die on failure in EAPI 4, bug 273651 --- bin/isolated-functions.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'bin/isolated-functions.sh') diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index fb6ad64ff..ddcf8f0d7 100644 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -70,6 +70,17 @@ nonfatal() { PORTAGE_NONFATAL=1 "$@" } +helpers_die() { + case "${EAPI:-0}" in + 0|1|2|3) + echo -e "$@" >&2 + ;; + *) + die "$@" + ;; + esac +} + die() { if [[ $PORTAGE_NONFATAL -eq 1 ]]; then echo -e " $WARN*$NORMAL ${FUNCNAME[1]}: WARNING: $@" >&2 -- cgit v1.2.3-1-g7c22