From: Zac Medico Date: Sun, 30 Jan 2011 23:24:48 +0000 (-0800) Subject: die: include $EBUILD_PHASE in message X-Git-Tag: v2.2.0_alpha20~65 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=77f39aae4f2f3604407ca942bbfa58ef51bfa3a8;p=portage.git die: include $EBUILD_PHASE in message When a helper binary dies automatically in EAPI 4 and later, we don't get a stack trace, so at least report the phase that failed. --- diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index 8af202f65..f89c11ed5 100644 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -136,7 +136,11 @@ die() { (( n-- )) done - eerror "ERROR: $CATEGORY/$PF failed:" + # When a helper binary dies automatically in EAPI 4 and later, we don't + # get a stack trace, so at least report the phase that failed. + local phase_str= + [[ -n $EBUILD_PHASE ]] && phase_str=" ($EBUILD_PHASE phase)" + eerror "ERROR: $CATEGORY/$PF failed${phase_str}:" eerror " ${*:-(no error message)}" eerror # dump_trace is useless when the main script is a helper binary