Skip to content

Commit 5d41436

Browse files
yann-morin-1998eocanha
authored andcommitted
core/download: do not hard-code the path to the package hash file
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> Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> NOTE (eocanha): This patch caused conflicts that I had to resolve. I just added the new way usage of the new HASH_FILE variable to all the "-H" parameters used in the file. In the future, when we upgrade to a more recent buildroot (~Oct 2018) supporting versioned hashes and conflicts appear, we should just revert this patch and the previous one and use the code upstream.
1 parent 3cc66b4 commit 5d41436

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

package/pkg-download.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ endef
144144
define DOWNLOAD_SCP
145145
$(EXTRA_ENV) $(DL_WRAPPER) -b scp \
146146
-o $(DL_DIR)/$(2) \
147-
-H $(PKGDIR)/$($(PKG)_RAWNAME).hash \
147+
-H '$($(PKG)_HASH_FILE)' \
148148
$(QUIET) \
149149
-- \
150150
'$(call stripurischeme,$(call qstrip,$(1)))' \
@@ -175,7 +175,7 @@ endef
175175
define DOWNLOAD_WGET
176176
$(EXTRA_ENV) $(DL_WRAPPER) -b wget \
177177
-o $(DL_DIR)/$(2) \
178-
-H $(PKGDIR)/$($(PKG)_RAWNAME).hash \
178+
-H '$($(PKG)_HASH_FILE)' \
179179
$(QUIET) \
180180
-- \
181181
'$(call qstrip,$(1))' \
@@ -189,7 +189,7 @@ endef
189189
define DOWNLOAD_LOCALFILES
190190
$(EXTRA_ENV) $(DL_WRAPPER) -b cp \
191191
-o $(DL_DIR)/$(2) \
192-
-H $(PKGDIR)/$($(PKG)_RAWNAME).hash \
192+
-H '$($(PKG)_HASH_FILE)' \
193193
$(QUIET) \
194194
-- \
195195
$(call stripurischeme,$(call qstrip,$(1))) \

0 commit comments

Comments
 (0)