This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 6f56e69a1 system/nxdiag: Fix race condition during build
6f56e69a1 is described below
commit 6f56e69a142f8f461b8f421e6398baacb26cc38b
Author: Lucas Saavedra Vaz <[email protected]>
AuthorDate: Mon Jul 17 13:16:00 2023 -0300
system/nxdiag: Fix race condition during build
This commit fixed a race condition that might happen by only unshallowing
the Espressif HAL only after it was completely cloned.
---
system/nxdiag/Makefile | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/system/nxdiag/Makefile b/system/nxdiag/Makefile
index ca8f7c776..73efc4edd 100644
--- a/system/nxdiag/Makefile
+++ b/system/nxdiag/Makefile
@@ -67,13 +67,20 @@ ARCH_ESP_HALDIR =
$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)
# If the esp-hal-3rdparty directory is not in the arch directory, then it can
be
# cloned to the nxdiag directory for debugging purposes.
-HALDIR := $(shell if [ -d $(ARCH_ESP_HALDIR)$(DELIM).git ]; then echo
"$(ARCH_ESP_HALDIR)"; else echo "$(NXDIAGDIR)$(DELIM)esp-hal-3rdparty"; fi)
+HALDIR := $(shell \
+ if [ -f $(ARCH_ESP_HALDIR)$(DELIM).git$(DELIM)index ]; then \
+ echo "$(ARCH_ESP_HALDIR)"; \
+ else \
+ echo "$(NXDIAGDIR)$(DELIM)esp-hal-3rdparty"; \
+ fi \
+)
INFO_DEPS += espressif_prepare
espressif_prepare:
ifeq ($(HALDIR),$(ARCH_ESP_HALDIR))
- (cd ${HALDIR} && git fetch -q --depth=10000 && git fetch -q --tags)
+ @echo "Unshallowing Espressif HAL..."
+ (cd ${HALDIR} && git fetch --depth=10000 && git fetch --tags)
endif
ifdef ESPTOOL_BINDIR