diff options
author | fuzzard <fuzzard@users.noreply.github.com> | 2022-05-23 17:49:25 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-23 17:49:25 +1000 |
commit | c447eb4d115a5da015bff5cb7ce7e8620dd79dd7 (patch) | |
tree | 49c6bcede20595529866c95e4d6b753b709aec39 | |
parent | ffd5dae3489d7b74e6a42ffddd2280cb705b67a1 (diff) | |
parent | 5d909a185e87e87df080ec9899a24fc0a34f6637 (diff) |
Merge pull request #21378 from fuzzard/makefile_downloadretry
[tools/depends] download-files.include fixes
-rw-r--r-- | tools/depends/download-files.include | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/depends/download-files.include b/tools/depends/download-files.include index 9b09fc574e..3f41dfa1e9 100644 --- a/tools/depends/download-files.include +++ b/tools/depends/download-files.include @@ -40,7 +40,8 @@ ifeq ($(HASH_FOUND),no) endif ifeq ($(HASH_FOUND),yes) # we really need 2 spaces between sha hash and file name! -# if the hash sum doesn't match we retry up to 3 times +# if the hash sum doesn't match we retry up to 3 times, add verbose curl output for diagnostics on retries +# if we fail 3 times, cleanup anything downloaded (eg bad tar) @cd $(TARBALLS_LOCATION); echo "$(HASH_SUM) $(ARCHIVE)" > $(ARCHIVE).$(HASH_TYPE) && $(HASH_TOOL) $(HASH_TOOL_FLAGS) $(ARCHIVE).$(HASH_TYPE) \ || {\ echo "Error: failed to verify hash sum of $(ARCHIVE), expected type: $(HASH_TYPE) value $(HASH_SUM), retrying.." ;\ @@ -49,9 +50,10 @@ ifeq ($(HASH_FOUND),yes) echo "download $(ARCHIVE) retry $$tries" ;\ rm $(TARBALLS_LOCATION)/$(ARCHIVE) ;\ sleep 3 ;\ - $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) ;\ + $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) -v $(BASE_URL)/$(ARCHIVE) ;\ $(HASH_TOOL) $(HASH_TOOL_FLAGS) $(ARCHIVE).$(HASH_TYPE) && exit 0 || tries=$$((tries + 1)) ;\ done ;\ + rm $(TARBALLS_LOCATION)/$(ARCHIVE) ;\ exit 1 ;\ } endif |