-
Notifications
You must be signed in to change notification settings - Fork 18.3k
Closed
Labels
Milestone
Description
When building packages outside of the GOROOT (i.e. GOPATH != GOROOT), go may still attempt to rebuild packages in the GOROOT if they depend on a package in the GOROOT that appears to be stale. This is easily reproduced as follows: $ sudo tar -C /usr/local -xzf go1.0.3.linux-amd64.tar.gz $ sudo touch /usr/local/go/pkg/linux_amd64/reflect.a $ echo $GOPATH /home/jsing/src/mygo $ cat example/example.go package example import _ "encoding/binary" $ go install example go install encoding/binary: open /usr/local/go/pkg/linux_amd64/encoding/binary.a: permission denied In the above case, encoding/binary is marked as stale and go attempts to rebuild it since reflect is considered stale, even though encoding/binary is under the GOROOT. This results in problems when users are not able to write to GOROOT; the packaging comments from issue/4106 are also applicable here.