From 83b4b8792f8d600ce7630fa6d917c02ac93c856e Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 26 Nov 2007 11:23:17 +0000 Subject: Bug #200313 - Detect and report when an ebuild phase exits unexpectedly. This is type of behavior is known to be triggered by things such as failed variable assignments (bug #190128) or bad substitution errors (bug #200313). We use a EBUILD_EXIT_STATUS_FILE environment variable to specify a file that the shell code is supposed to create when it exits in a normal manner. If the file does not get created like it's supposed to be then we can conclude that the shell has exited in some unexpected way. svn path=/main/trunk/; revision=8682 --- bin/ebuild.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin/ebuild.sh') diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 46651e76a..a6969c9d8 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -1726,7 +1726,7 @@ if [ -n "${EBUILD_SH_ARGS}" ] ; then 9>&- fi set +f - #make sure it is writable by our group: + touch "${EBUILD_EXIT_STATUS_FILE}" &>/dev/null exit 0 ;; *) @@ -1737,6 +1737,7 @@ if [ -n "${EBUILD_SH_ARGS}" ] ; then exit 1 ;; esac + touch "${EBUILD_EXIT_STATUS_FILE}" &>/dev/null fi # Save the env only for relevant phases. -- cgit v1.2.3-1-g7c22