Check if ${EBUILD_EXIT_STATUS_FILE} is empty before
authorZac Medico <zmedico@gentoo.org>
Mon, 26 Nov 2007 12:06:12 +0000 (12:06 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 26 Nov 2007 12:06:12 +0000 (12:06 -0000)
attempting to use it.

svn path=/main/trunk/; revision=8686

bin/ebuild.sh
bin/isolated-functions.sh
bin/misc-functions.sh

index a6969c9d86bd108f00b9242723a8f0bd4001a738..b8ca584d4487684c95137f6d011deb621132a276 100755 (executable)
@@ -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.
index 9eaf9bffb61dd4b4e00f37108cd304afb8dd3f41..70cae70975c2a4c1188ebbc07eea7caf9423beb0 100755 (executable)
@@ -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}
index 450e71631beb301eccec8d9ec1f6f90b02c9cbbd..1da66392c0ef050414617b919b93756f0f622df6 100755 (executable)
@@ -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
 
 :