aboutsummaryrefslogtreecommitdiff
path: root/package/pkg-download.mk
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2016-04-18 00:17:12 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2016-04-20 23:37:19 +0200
commit5652374a0e299d37826ddaab48b857a4b8136c6d (patch)
tree5e1023bd45e2f6b137257b67a50c24a911ec1ac8 /package/pkg-download.mk
parent5dce3c05b5ea38539f6ee6efc24c13db936260dc (diff)
downloadbuildroot-5652374a0e299d37826ddaab48b857a4b8136c6d.tar.gz
buildroot-5652374a0e299d37826ddaab48b857a4b8136c6d.tar.bz2
core/pkg-download: ignore hashes from mirror for VCS downloads
When a download via a VCS method fails, Buildroot attempts the download from the backup mirror (if any is set). Such a download is done with the wget helper. Given a package that has a .hash file for relase tarballs, which also allows the user to use a random revision from a VCS, the normal download wrapper will not check for hashes, on the assumption that maybe they are not reproducible [*] (or user configurable). However, when the download fails (for any reason: network error, upstream removed the revision, old machine with incomplete set of CA certificates...), the backup download now proceeds over with http (or https) with the wget wrapper. The wget wrapper *always* checks for hashes, and when a .hash file is present but no hash is found for the download, this is considered an error. However, when we download from the backup mirror for a main download that should have been done with git/hq/svn/.., we in this situation have no hash for the download. Thus, we should not fail on a missing hash for that download. Same situation if a primary site is used. Add a test for the site-method in the DOWNLOAD_INNER macro; if it was either one of the VCS method, pass a one-off BR_NO_CHECK_HASH_FOR variable set to contain the tarball to download. Fixes issues like those reported by the Travis build bots: https://travis-ci.org/buildroot/buildroot-defconfig-testing/jobs/123624879 [Peter: Move logic to beginning of DOWNLOAD_INNER so it also applies for BR2_PRIMARY_SITE] Reported-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/pkg-download.mk')
-rw-r--r--package/pkg-download.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/package/pkg-download.mk b/package/pkg-download.mk
index 1332e66fd2..a0f694d0fd 100644
--- a/package/pkg-download.mk
+++ b/package/pkg-download.mk
@@ -212,7 +212,8 @@ define SOURCE_CHECK
endef
define DOWNLOAD_INNER
- $(Q)if test -n "$(call qstrip,$(BR2_PRIMARY_SITE))" ; then \
+ $(Q)$(if $(filter bzr cvs git hg svn,$($(PKG)_SITE_METHOD)),export BR_NO_CHECK_HASH_FOR=$(2);) \
+ if test -n "$(call qstrip,$(BR2_PRIMARY_SITE))" ; then \
case "$(call geturischeme,$(BR2_PRIMARY_SITE))" in \
file) $(call $(3)_LOCALFILES,$(BR2_PRIMARY_SITE)/$(2),$(2)) && exit ;; \
scp) $(call $(3)_SCP,$(BR2_PRIMARY_SITE)/$(2),$(2)) && exit ;; \