Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH RFC] core/pkg-download: ignore hashes from mirror for VCS downloads
Date: Wed, 20 Apr 2016 23:05:07 +0200	[thread overview]
Message-ID: <877ffsc7p8.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <57141122.7050805@mind.be> (Arnout Vandecappelle's message of "Mon, 18 Apr 2016 00:41:38 +0200")

>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:

 > On 04/18/16 00:17, Yann E. MORIN wrote:
 >> 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 [*].
 >> 
 >> 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, we in this situation have no hash
 >> for the download. Thus, we should not fail on a missing hash for that
 >> download.
 >> 
 >> Add a test for the site-method in the backup mirror download; 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.

 >  Even though this looks like a bit of a hack, I see no better way of
 > handling the situation.

 >  However, the same should also be done for PRIMARY_SITE IMHO.

Agreed. I moved the variable handling to the beginning of DOWNLOAD_INNER
so it is set when we handle BR2_PRIMARY_SITE as well and committed,
thanks.

-- 
Bye, Peter Korsgaard

      reply	other threads:[~2016-04-20 21:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-17 22:17 [Buildroot] [PATCH RFC] core/pkg-download: ignore hashes from mirror for VCS downloads Yann E. MORIN
2016-04-17 22:41 ` Arnout Vandecappelle
2016-04-20 21:05   ` Peter Korsgaard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877ffsc7p8.fsf@dell.be.48ers.dk \
    --to=peter@korsgaard.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox