[LEDE-DEV] [PATCH 2/2] download.mk: introduce a new variable SKIPHASH
Stijn Tintel
stijn at linux-ipv6.be
Thu Dec 7 10:38:48 PST 2017
On 07-12-17 15:56, Jo-Philipp Wich wrote:
> 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.
>
I prefer this over using an extra variable.
Acked-by: Stijn Tintel <stijn at linux-ipv6.be>
More information about the Lede-dev
mailing list