summaryrefslogtreecommitdiffstats
path: root/meta/classes/icecc.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/icecc.bbclass')
-rw-r--r--meta/classes/icecc.bbclass20
1 files changed, 13 insertions, 7 deletions
diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index aea1095f5f..1b58d1f5e5 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -366,14 +366,20 @@ set_icecc_env() {
366 366
367 # the ICECC_VERSION generation step must be locked by a mutex 367 # the ICECC_VERSION generation step must be locked by a mutex
368 # in order to prevent race conditions 368 # in order to prevent race conditions
369 if flock -n "${ICECC_VERSION}.lock" \ 369 exit_code=0
370 ${ICECC_ENV_EXEC} ${ICECC_ENV_DEBUG} "${ICECC_CC}" "${ICECC_CXX}" "${ICECC_AS}" "${ICECC_VERSION}" 370 flock -n -E 10 "${ICECC_VERSION}.lock" \
371 then 371 ${ICECC_ENV_EXEC} ${ICECC_ENV_DEBUG} "${ICECC_CC}" "${ICECC_CXX}" "${ICECC_AS}" "${ICECC_VERSION}" || exit_code=$?
372 if [ "$exit_code" -eq 0 ]; then
373 touch "${ICECC_VERSION}.done"
374 elif [ "$exit_code" -eq "10" ]; then
375 if [ ! wait_for_file "${ICECC_VERSION}.done" 30 ]; then
376 # locking failed so wait for ${ICECC_VERSION}.done to appear
377 bbwarn "Timeout waiting for ${ICECC_VERSION}.done"
378 return
379 fi
380 else
381 bbwarn "Could not create icecc environment: $exit_code"
372 touch "${ICECC_VERSION}.done" 382 touch "${ICECC_VERSION}.done"
373 elif [ ! wait_for_file "${ICECC_VERSION}.done" 30 ]
374 then
375 # locking failed so wait for ${ICECC_VERSION}.done to appear
376 bbwarn "Timeout waiting for ${ICECC_VERSION}.done"
377 return 383 return
378 fi 384 fi
379 fi 385 fi