aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/link/internal/ppc64/asm.go
diff options
context:
space:
mode:
authorJay Conrod <jayconrod@google.com>2021-03-03 16:30:22 -0500
committerAlexander Rakoczy <alex@golang.org>2021-03-25 18:28:32 +0000
commit7038a380bcd0183842471c1984da491e044d3d34 (patch)
tree78b7e7335ad29bf3d706a8d324c8ac78371463fd /src/cmd/link/internal/ppc64/asm.go
parentdcffdac515a1d409bcb61783d57ddb137b4741b9 (diff)
downloadgo-7038a380bcd0183842471c1984da491e044d3d34.tar.gz
go-7038a380bcd0183842471c1984da491e044d3d34.zip
[release-branch.go1.15] cmd/go/internal/modfetch: detect and recover from missing ziphash file
Previously, if an extracted module directory existed in the module cache, but the corresponding ziphash file did not, if the sum was missing from go.sum, we would not verify the sum. This caused 'go get' not to write missing sums. 'go build' in readonly mode (now the default) checks for missing sums and doesn't attempt to fetch modules that can't be verified against go.sum. With this change, when requesting the module directory with modfetch.DownloadDir, if the ziphash file is missing, the go command will re-hash the zip without downloading or re-extracting it again. Note that the go command creates the ziphash file before the module directory, but another program could remove it separately, and it might not be present after a crash. Fixes #44872 Change-Id: I64551e048a3ba17d069de1ec123d5b8b2757543c Reviewed-on: https://go-review.googlesource.com/c/go/+/298352 Trust: Jay Conrod <jayconrod@google.com> Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> (cherry picked from commit 302a400316319501748c0f034464fa70e7815272) Reviewed-on: https://go-review.googlesource.com/c/go/+/299830
Diffstat (limited to 'src/cmd/link/internal/ppc64/asm.go')
0 files changed, 0 insertions, 0 deletions