core/pkg-infra: set no-check-hash only for main download
authorYann E. MORIN <yann.morin.1998@free.fr>
Wed, 25 Apr 2018 19:41:52 +0000 (21:41 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 1 May 2018 20:59:48 +0000 (22:59 +0200)
commit6908c82a8886bd9130e825ccf2d9c58cfa887d23
treebac9f3fcb641ea719808a2dc04dc9ac42e2ba073
parent95aa7ad1ef5e2b199ed4d50eff63f064f4e65d3c
core/pkg-infra: set no-check-hash only for main download

Currently, when the main download if from an SCM, we exclude all
downloads from being hash-checked, on the assumption that we don't
have hashes for downloads from an SCM.

However, the exclusion is computed on the DOWNLOAD macro, which is
called for each download of a package, thus effectively disabling
hash checks for extra downloads, even though those are only ever
download with wget.

What we really wanted to do, in fact, was to exclude just the main
download.

We fix that by appending the main source file to the global list of
excluded files, from within the generic-package infra itself.

Reported-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/pkg-download.mk
package/pkg-generic.mk