From: Zac Medico Date: Mon, 26 Nov 2007 12:06:12 +0000 (-0000) Subject: Check if ${EBUILD_EXIT_STATUS_FILE} is empty before X-Git-Tag: v2.2_pre1~309 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=48e68662cf7ab600859c434ba3108b8f2ff24199;p=portage.git Check if ${EBUILD_EXIT_STATUS_FILE} is empty before attempting to use it. svn path=/main/trunk/; revision=8686 --- 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 100755 --- 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 450e71631..1da66392c 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -593,6 +593,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 :