gluon/patches/openwrt/0020-build-add-locking-for-downloads-fixes-race-conditions-with-multiple-variants.patch
Matthias Schiffer 5a31cacee4
Update OpenWrt base
This also reverts commit 24d8695d8ceeb09d6c84bcd6ee4ffe087c9b386b...
2016-05-09 23:12:55 +02:00

21 lines
779 B
Diff

From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sun, 24 Apr 2016 08:48:45 +0200
Subject: build: add locking for downloads (fixes race conditions with multiple variants)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Backport of r48416
diff --git a/include/download.mk b/include/download.mk
index e518cce..9176b11 100644
--- a/include/download.mk
+++ b/include/download.mk
@@ -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