diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-11-26 11:23:17 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-11-26 11:23:17 +0000 |
commit | 83b4b8792f8d600ce7630fa6d917c02ac93c856e (patch) | |
tree | 76500afc56f952dba4e2b3c1e1a155c6e88ad93d /bin/isolated-functions.sh | |
parent | 9116d76089d00491f5f20a4d834408b7ff45c983 (diff) | |
download | portage-83b4b8792f8d600ce7630fa6d917c02ac93c856e.tar.gz portage-83b4b8792f8d600ce7630fa6d917c02ac93c856e.tar.bz2 portage-83b4b8792f8d600ce7630fa6d917c02ac93c856e.zip |
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
Diffstat (limited to 'bin/isolated-functions.sh')
-rwxr-xr-x | bin/isolated-functions.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index ae418389d..9eaf9bffb 100755 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -124,6 +124,8 @@ diefunc() { done fi + touch "${EBUILD_EXIT_STATUS_FILE}" &>/dev/null + # subshell die support kill -s SIGTERM ${EBUILD_MASTER_PID} exit 1 @@ -416,7 +418,8 @@ save_ebuild_env() { # portage config variables and variables set directly by portage unset BAD BRACKET BUILD_PREFIX COLS \ - DISTCC_DIR DISTDIR DOC_SYMLINKS_DIR EBUILD_MASTER_PID \ + DISTCC_DIR DISTDIR DOC_SYMLINKS_DIR \ + EBUILD_EXIT_STATUS_FILE EBUILD_MASTER_PID \ ECLASSDIR ECLASS_DEPTH ENDCOL FAKEROOTKEY FEATURES \ GOOD HILITE HOME IMAGE \ KV LAST_E_CMD LAST_E_LEN LD_PRELOAD MOPREFIX \ |