Go: x/build/cmd/release: go1.12rc1 source tarball includes empty gocache and tmp directories

Created on 12 Feb 2019  Â·  5Comments  Â·  Source: golang/go

Issue #29906 has been mostly resolved, but there's still a minor issue where the go1.12rc1.src.tar.gz release archive (from #30175) has empty gocache and tmp directories:

$ tree
.
├── go1.12rc1.src.tar.gz
└── go1.12rc1.src
    ├── go
    │   ├── AUTHORS
    │   ├── CONTRIBUTING.md
    │   ├── CONTRIBUTORS
    │   └── ...
    ├── gocache
    └── tmp

All other release archives do not have gocache and tmp directories.

These directories are empty, so the impact is low, but we should still clean this up further. /cc @bradfitz @FiloSottile @julieqiu @andybons

The source tarball also has a slightly different structure: it contains a top-level "go1.12rc1.src" directory, which then has a "go" directory inside. All others have "go" at the root. This isn't a problem, just mentioning it because it might be helpful for identifying the cause.

Builders FrozenDueToAge NeedsInvestigation release-blocker

All 5 comments

Sent https://go-review.googlesource.com/c/build/+/161967 (not sure what gopherbot is doing)

Change https://golang.org/cl/161967 mentions this issue: cmd/release: clean gocache and tmp in source mode too

This gets to be "Go1.12" not "Unreleased" because it affects the bits that go into the release (even though the command itself is not released).

The source tarball also has a slightly different structure: it contains a top-level "go1.12rc1.src" directory, which then has a "go" directory inside. All others have "go" at the root. This isn't a problem, just mentioning it because it might be helpful for identifying the cause.

I think the cause is you double clicking it on a Mac and macOS auto-extracting it using its prefix as the directory name. I don't see such a top-level directory actually existing:

bradfitz@gdev:~/src/golang.org/x/build/cmd/release$ curl --silent https://dl.google.com/go/go1.10.4.src.tar.gz | tar -zt | grep -v ^go/
bradfitz@gdev:~/src/golang.org/x/build/cmd/release$ curl --silent https://dl.google.com/go/go1.11.5.src.tar.gz | tar -zt | grep -v ^go/
gocache/
tmp/
bradfitz@gdev:~/src/golang.org/x/build/cmd/release$ curl --silent https://dl.google.com/go/go1.11.4.src.tar.gz | tar -zt | grep -v ^go/
bradfitz@gdev:~/src/golang.org/x/build/cmd/release$ 

@bradfitz You're absolutely right, that's what happened. I didn't know about that behavior of Archive Utility.app on macOS.

I also confirmed the "go" directory is indeed top-level in go1.12rc1.src.tar.gz by making quick use of the compress/gzip and archive/tar packages. Thanks for helping me understand this.

Was this page helpful?
0 / 5 - 0 ratings