[LEDE-DEV] [PATCH 2/2] download.mk: introduce a new variable SKIPHASH

Jo-Philipp Wich jo at mein.io
Thu Dec 7 06:56:12 PST 2017


Hi Baptiste,

we've been discussing this patch again on IRC today and I came up with
an alternate suggestion that does not require a new variable.

-- 8< --
diff --git a/scripts/download.pl b/scripts/download.pl
index 775408934a..ad9c480c67 100755
--- a/scripts/download.pl
+++ b/scripts/download.pl
@@ -88,7 +88,7 @@ sub download_cmd($) {
 }

 my $hash_cmd = hash_cmd();
-$hash_cmd or die "Cannot find appropriate hash command, ensure the
provided hash is either a MD5 or SHA256 checksum.\n";
+$hash_cmd or ($file_hash eq "none") or die "Cannot find appropriate
hash command, ensure the provided hash is either a MD5 or SHA256
checksum.\n";

 sub download
 {
-- >8 --

Using the change above one can issue a

  "make package/mypackage/download PKG_HASH=none"

to download ignoring the Makefile checksum while preserving the error
semantics of unset PKG_HASH cases.

Ideally I'd like to push the "none" variant but wanted to share the idea
on the list first to see what others think about it.

Regards,
Jo



More information about the Lede-dev mailing list