build: add locking for downloads (fixes race conditions with multiple variants)
authorFelix Fietkau <nbd@openwrt.org>
Wed, 20 Jan 2016 21:31:50 +0000 (21:31 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 20 Jan 2016 21:31:50 +0000 (21:31 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 48416

include/download.mk

index ca5eee4..ffde522 100644 (file)
@@ -182,6 +182,6 @@ define Download
 
   $(DL_DIR)/$(FILE):
        mkdir -p $(DL_DIR)
-       $(if $(DownloadMethod/$(call dl_method,$(URL),$(PROTO))),$(DownloadMethod/$(call dl_method,$(URL),$(PROTO))),$(DownloadMethod/unknown))
+       $(call locked,$(if $(DownloadMethod/$(call dl_method,$(URL),$(PROTO))),$(DownloadMethod/$(call dl_method,$(URL),$(PROTO))),$(DownloadMethod/unknown)),$(FILE))
 
 endef