0027-build-add-locking-for-downloads-fixes-race-conditions-with-multiple-variants.patch 779 B

1234567891011121314151617181920
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Sun, 24 Apr 2016 08:48:45 +0200
  3. Subject: build: add locking for downloads (fixes race conditions with multiple variants)
  4. Signed-off-by: Felix Fietkau <nbd@openwrt.org>
  5. Backport of r48416
  6. diff --git a/include/download.mk b/include/download.mk
  7. index e518cce..9176b11 100644
  8. --- a/include/download.mk
  9. +++ b/include/download.mk
  10. @@ -182,6 +182,6 @@ define Download
  11. $(DL_DIR)/$(FILE):
  12. mkdir -p $(DL_DIR)
  13. - $(if $(DownloadMethod/$(call dl_method,$(URL),$(PROTO))),$(DownloadMethod/$(call dl_method,$(URL),$(PROTO))),$(DownloadMethod/unknown))
  14. + $(call locked,$(if $(DownloadMethod/$(call dl_method,$(URL),$(PROTO))),$(DownloadMethod/$(call dl_method,$(URL),$(PROTO))),$(DownloadMethod/unknown)),$(FILE))
  15. endef