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 ca5eee4e028984e7de9c939bae7f92178a57a888..ffde522923633ebc143b9bf4aa364d7b9346352f 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