Skip to content

Commit 4454b40

Browse files
committed
[depends] Fix FALLBACK_DOWNLOAD_PATH
Fixes the case where build_DOWNLOAD (using curl or wget) fails to download the required package from the default URL specified in depends/packages/%recipe_name%.mk. It will then attempt to download from FALLBACK_DOWNLOAD_PATH. This also resolves the macOS CI/CD error "curl: (3) URL rejected: No host part in the URL" noted here: #652. It appears that newer versions of curl included in the latest GitHub runner image exit with an error when FALLBACK_DOWNLOAD_PATH is not set (due to mixed-up variable names FALLBACK_DOWNLOAD_PATH and PRIORITY_DOWNLOAD_PATH in the Makefile). This should now be fixed.
1 parent 0a55802 commit 4454b40

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

depends/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ BASE_CACHE ?= $(BASEDIR)/built
55
SDK_PATH ?= $(BASEDIR)/SDKs
66
NO_WALLET ?=
77
NO_UPNP ?=
8-
FALLBACK_DOWNLOAD_PATH ?= https://supernet/depends-sources
8+
FALLBACK_DOWNLOAD_PATH ?= https://download.decker.im/depends-sources
99

1010
BUILD ?= $(shell ./config.guess)
1111
HOST ?= $(BUILD)

depends/funcs.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ endef
2222
define fetch_file
2323
(test -f $$($(1)_source_dir)/$(4) || \
2424
( mkdir -p $$($(1)_download_dir) && echo Fetching $(1)... && \
25-
( $(build_DOWNLOAD) "$$($(1)_download_dir)/$(4).temp" "$(PRIORITY_DOWNLOAD_PATH)/$(4)" || \
26-
$(build_DOWNLOAD) "$$($(1)_download_dir)/$(4).temp" "$(2)/$(3)" ) && \
25+
( $(build_DOWNLOAD) "$$($(1)_download_dir)/$(4).temp" "$(2)/$(3)" || \
26+
$(build_DOWNLOAD) "$$($(1)_download_dir)/$(4).temp" "$(FALLBACK_DOWNLOAD_PATH)/$(4)" ) && \
2727
echo "$(5) $$($(1)_download_dir)/$(4).temp" > $$($(1)_download_dir)/.$(4).hash && \
2828
$(build_SHA256SUM) -c $$($(1)_download_dir)/.$(4).hash && \
2929
mv $$($(1)_download_dir)/$(4).temp $$($(1)_source_dir)/$(4) && \

0 commit comments

Comments
 (0)