]> code.ossystems Code Review - openembedded-core.git/commitdiff
Revert "icecc.bbclass: Improve error reporting"
authorJoshua Watt <jpewhacker@gmail.com>
Fri, 20 Apr 2018 13:54:06 +0000 (08:54 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 23 Apr 2018 10:15:06 +0000 (11:15 +0100)
This reverts commit b28114cf1e58643bd233bc0c83d6d8138952b7ac.

The "-E" option for flock is not ubiquitously supported, so don't use
it.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/icecc.bbclass

index 73eba7a6a963aba5a62fbf9dd3133d2c891b8957..0ca8de86c243341205a269172501e7e6f7eb8744 100644 (file)
@@ -366,20 +366,14 @@ set_icecc_env() {
 
         # the ICECC_VERSION generation step must be locked by a mutex
         # in order to prevent race conditions
-        exit_code=0
-        flock -n -E 10 "${ICECC_VERSION}.lock" \
-            ${ICECC_ENV_EXEC} ${ICECC_ENV_DEBUG} "${ICECC_CC}" "${ICECC_CXX}" "${ICECC_AS}" "${ICECC_VERSION}" || exit_code=$?
-        if [ "$exit_code" -eq 0 ]; then
-            touch "${ICECC_VERSION}.done"
-        elif [ "$exit_code" -eq "10" ]; then
-            if [ ! wait_for_file "${ICECC_VERSION}.done" 30 ]; then
-                # locking failed so wait for ${ICECC_VERSION}.done to appear
-                bbwarn "Timeout waiting for ${ICECC_VERSION}.done"
-                return
-            fi
-        else
-            bbwarn "Could not create icecc environment: $exit_code"
+        if flock -n "${ICECC_VERSION}.lock" \
+            ${ICECC_ENV_EXEC} ${ICECC_ENV_DEBUG} "${ICECC_CC}" "${ICECC_CXX}" "${ICECC_AS}" "${ICECC_VERSION}"
+        then
             touch "${ICECC_VERSION}.done"
+        elif [ ! wait_for_file "${ICECC_VERSION}.done" 30 ]
+        then
+            # locking failed so wait for ${ICECC_VERSION}.done to appear
+            bbwarn "Timeout waiting for ${ICECC_VERSION}.done"
             return
         fi
     fi