From 94fa873853d13bd17ca34f9d2d9ed8ec23200d56 Mon Sep 17 00:00:00 2001 From: Nate Wilcox Date: Thu, 17 Sep 2020 06:19:16 +0000 Subject: [PATCH] depends: fix a logging bug for multi-archive packages. While initially fetching packages, I saw `sh: test:` error messages in the make output for only two packages. However, it appears all packages are correctly fetched. I tested this patch manually by running these three tests against the `v4.0.0` tag and then with this patch. In all 6 cases I visually inspected the output. 1. Starting with a pre-downloaded source cash, run the `download` target. 2. Remove an archive from a multi-archive package, then rerun `download`. 3. Alter a hash to cause a hash mismatch condition, then rerun `download`. I believe after each step both with and without this patch the resulting source cache should be identical (except for filesystem timestamps). Co-authored-by: Nathan Wilcox Signed-off-by: Daira Hopwood --- depends/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depends/Makefile b/depends/Makefile index e10c853c9..f184cfef7 100644 --- a/depends/Makefile +++ b/depends/Makefile @@ -138,7 +138,7 @@ endef define check_or_remove_sources mkdir -p $($(package)_source_dir); cd $($(package)_source_dir); \ $(build_SHA256SUM) -c $($(package)_fetched) >/dev/null 2>/dev/null || \ - ( if test -f $($(package)_all_sources); then echo "Checksum missing or mismatched for $(package) source. Forcing re-download."; fi; \ + ( ( echo $($(package)_all_sources) | xargs -n 1 test -f ) || echo "Checksum missing or mismatched for $(package) source. Forcing re-download."; \ rm -f $($(package)_all_sources) $($(1)_fetched)) endef