[4/6] core/download: do not hard-code the path to hte package hash file

Message ID a3bc31d31ce5fd69e68d41d0e725c910d998a45f.1538913431.git.yann.morin.1998@free.fr
State Changes Requested
Headers show
Series
  • Untitled series #69422
Related show

Commit Message

Yann E. MORIN Oct. 7, 2018, 11:57 a.m.
Now that packges may have hashes for their downloaded files in a
versioned subdir or in the unversioned hash file, we can no longer
hard-code the path to the package hash file anymore.

Instead, we now make use of the per-package variable, that points to the
package hash file.

Note: of the packages for which we offer a version choice, almost none,
but some of the qt5 ones, have a per-version hash file, so we still use
the unversioned hash file for them. As for the few qt5 packages that do
have a per-version hash file for their licensing terms, they've already
been updated to duplicate their download hashes in both the unversioned
and per-version hash files. So, one way or the other, no hash check
would go missing with this change.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Baruch Siach <baruch@tkos.co.il>
---
 package/pkg-download.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Luca Ceresoli Oct. 12, 2018, 7:45 a.m. | #1
Hi,

On 07/10/2018 13:57, Yann E. MORIN wrote:
> Now that packges may have hashes for their downloaded files in a
> versioned subdir or in the unversioned hash file, we can no longer
> hard-code the path to the package hash file anymore.
> 
> Instead, we now make use of the per-package variable, that points to the
> package hash file.
> 
> Note: of the packages for which we offer a version choice, almost none,
> but some of the qt5 ones, have a per-version hash file, so we still use
> the unversioned hash file for them. As for the few qt5 packages that do
> have a per-version hash file for their licensing terms, they've already
> been updated to duplicate their download hashes in both the unversioned
> and per-version hash files. So, one way or the other, no hash check
> would go missing with this change.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Cc: Arnout Vandecappelle <arnout@mind.be>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> Cc: Baruch Siach <baruch@tkos.co.il>

Minor nit: "hte" -> "the" in the subject line.

Anyway,
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>

Patch

diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index bf93b9a08e..73ea2a69f8 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -97,7 +97,7 @@  define DOWNLOAD
 		-d '$($(PKG)_DL_DIR)' \
 		-D '$(DL_DIR)' \
 		-f '$(notdir $(1))' \
-		-H '$(PKGDIR)/$($(PKG)_RAWNAME).hash' \
+		-H '$($(PKG)_HASH_FILE)' \
 		-n '$($(PKG)_BASENAME_RAW)' \
 		-N '$($(PKG)_RAWNAME)' \
 		-o '$($(PKG)_DL_DIR)/$(notdir $(1))' \