bootstrap: Share tarballs between worktrees
commit49ab66d4ce0b00a81ba391e83fd123613e435ca7
authorOlly Betts <olly@survex.com>
Wed, 27 Jun 2018 23:56:33 +0000 (28 11:56 +1200)
committerOlly Betts <olly@survex.com>
Thu, 28 Jun 2018 01:53:29 +0000 (28 13:53 +1200)
tree34a9fffc5f014ebaa1bce0f9314df28c07db5cb6
parent296022387beeb310b7f30a5f11e57b5cb5a6844d
bootstrap: Share tarballs between worktrees

If we're in a linked worktree, use tarballs from the main worktree's
BUILD directory if we can to avoid downloading files we already have,
and if we have to download a tarball save it in the main worktree's
BUILD directory so it can be used by other worktrees.

To avoid race-type problems with another process using a tarball between
download and signature checking we now download to a "quarantined"
temporary filename and check the hash of that, and only rename to the
final name if that check succeeds (which is a better approach anyway).
bootstrap