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

svn path=/main/branches/2.1.2/; revision=8687

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 100644 (file)
@@ -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 633b3c37d1408c3170c4fd35b673c7142131b8f2..9e37fe1184e8bb9961f29d3db775c3101ccb8e0e 100755 (executable)
@@ -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
 
 :