aboutsummaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2015-04-23 00:08:38 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-04-25 11:51:08 +0200
commit8d2f4e6246a3c63a76279a1cc8fb6f863fe85b8e (patch)
tree0d57bd197bc3b9795b60ebc6333ba716897fe563 /support
parent3449a6ee4a897411d56b87a1caf65fbc8a0520e0 (diff)
downloadbuildroot-8d2f4e6246a3c63a76279a1cc8fb6f863fe85b8e.tar.gz
buildroot-8d2f4e6246a3c63a76279a1cc8fb6f863fe85b8e.tar.bz2
support/download: add possibility to not fail on missing hash
In very constrained cases, it might be needed to not fail if a hash is missing. This is notably the case for custom external toolchains to be downloaded, because we do have a .hash file for external toolchains, but we obviously can not have hashes for all existing custom toolchains (he, "custom"!). So, add a way to avoid failing in that case. >From the Makefile, we export the list of files for which not to check the hash. Then, from the check-hash script, if no check was done, and the file we were trying to match in in this exclusion list, we just exit without error. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> changes v6 -> v7: - /beautify/ the pattern in the case clause Changed v5 -> v6: (Arnout) - fix the pattern in the case clause Changes v4 -> v5: - micro-optimisation, use case-esac instead of a for-loop (Arnout) - typoes (Arnout) Changes v3 -> v4: - drop the magic value, use a list of excluded files (Arnout) Changes v1 -> v2: - fix typoes in commit log Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Tested-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'support')
-rwxr-xr-xsupport/download/check-hash6
1 files changed, 6 insertions, 0 deletions
diff --git a/support/download/check-hash b/support/download/check-hash
index 678a7ef934..6b0372e3ed 100755
--- a/support/download/check-hash
+++ b/support/download/check-hash
@@ -99,6 +99,12 @@ while read t h f; do
done <"${h_file}"
if [ ${nb_checks} -eq 0 ]; then
+ case " ${BR_NO_CHECK_HASH_FOR} " in
+ *" ${base} "*)
+ # File explicitly has no hash
+ exit 0
+ ;;
+ esac
printf "ERROR: No hash found for %s\n" "${base}" >&2
exit 0
fi