Skip to contentSkip to conversation

Revert "icecc.bbclass: Improve error reporting"

PATCH New Joshua Watt 1 participant 1 message Apr 20, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "icecc.bbclass: Improve error reporting"

This reverts commit b28114cf1e58643bd233bc0c83d6d8138952b7ac.

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

---
 meta/classes/icecc.bbclass | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)
meta/classes/icecc.bbclass +7 -13
index 73eba7a6a96..0ca8de86c24 100644
@@ -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
Signature · 1 line
2.14.3