golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.83k stars 17.65k forks source link

cmd/go: install -a fails if GOROOT is not writeable #5065

Closed 4a6f656c closed 9 years ago

4a6f656c commented 11 years ago
Currently 'go install -a' fails when run for packages under GOPATH, if the GOROOT is not
writeable:

$ sudo tar -C /usr/local -xzf go1.0.3.linux-amd64.tar.gz
$ echo $GOPATH
/home/jsing/src/mygo
$ go install -a example
go install runtime: open /usr/local/go/pkg/linux_amd64/runtime.a: permission denied

Obviously '-a' means all, however it would be useful if we could force a rebuild for all
of the dependencies under the GOPATH only (or skip dependencies in GOROOT).
adg commented 11 years ago

Comment 1:

I think this should wait until after Go 1.1.

Labels changed: added priority-later, removed priority-triage.

rsc commented 11 years ago

Comment 2:

I don't want to make the pattern language more complex. You can already do
cd $GOPATH
go install ./...

Status changed to WorkingAsIntended.