diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-11-26 12:06:58 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-11-26 12:06:58 +0000 |
commit | 55a607ad548d28fe85f020debe366350885c741a (patch) | |
tree | 38fa584f0ca51d396d60af501d1e929441cd304a /bin | |
parent | 3edcda026f69d5fd1b54900474a5918da7cd1821 (diff) | |
download | portage-55a607ad548d28fe85f020debe366350885c741a.tar.gz portage-55a607ad548d28fe85f020debe366350885c741a.tar.bz2 portage-55a607ad548d28fe85f020debe366350885c741a.zip |
Check if ${EBUILD_EXIT_STATUS_FILE} is empty before
attempting to use it. (trunk r8686)
svn path=/main/branches/2.1.2/; revision=8687
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ebuild.sh | 6 | ||||
-rw-r--r-- | bin/isolated-functions.sh | 3 | ||||
-rwxr-xr-x | bin/misc-functions.sh | 3 |
3 files changed, 8 insertions, 4 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh index a6969c9d8..b8ca584d4 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -1726,7 +1726,8 @@ if [ -n "${EBUILD_SH_ARGS}" ] ; then 9>&- fi set +f - touch "${EBUILD_EXIT_STATUS_FILE}" &>/dev/null + [ -n "${EBUILD_EXIT_STATUS_FILE}" ] && \ + touch "${EBUILD_EXIT_STATUS_FILE}" &>/dev/null exit 0 ;; *) @@ -1737,7 +1738,8 @@ if [ -n "${EBUILD_SH_ARGS}" ] ; then exit 1 ;; esac - touch "${EBUILD_EXIT_STATUS_FILE}" &>/dev/null + [ -n "${EBUILD_EXIT_STATUS_FILE}" ] && \ + touch "${EBUILD_EXIT_STATUS_FILE}" &>/dev/null fi # Save the env only for relevant phases. diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index 9eaf9bffb..70cae7097 100644 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -124,7 +124,8 @@ diefunc() { done fi - touch "${EBUILD_EXIT_STATUS_FILE}" &>/dev/null + [ -n "${EBUILD_EXIT_STATUS_FILE}" ] && \ + touch "${EBUILD_EXIT_STATUS_FILE}" &>/dev/null # subshell die support kill -s SIGTERM ${EBUILD_MASTER_PID} diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 633b3c37d..9e37fe118 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -587,6 +587,7 @@ if [ -n "${MISC_FUNCTIONS_ARGS}" ]; then done fi -touch "${EBUILD_EXIT_STATUS_FILE}" &>/dev/null +[ -n "${EBUILD_EXIT_STATUS_FILE}" ] && \ + touch "${EBUILD_EXIT_STATUS_FILE}" &>/dev/null : |