openbsd-ports/lang/go/patches/patch-src_cmd_go_pkg_go
jsing 566078e7ce Update to go 1.0.3.
- Fix a bug in the regress tests that may result in the tests being built/run
  with the installed binaries rather than the new binaries.
- Fix a bug related to 'go install' trying to rebuild non-writeable $GOROOT
  packages, when used with a $GOPATH (issue 4106).
- Include the 'misc' part of the package, which contains editor
  configuration files, etc.

ok jsg@, sthen@
2012-10-01 06:20:09 +00:00

25 lines
922 B
Plaintext

$OpenBSD: patch-src_cmd_go_pkg_go,v 1.1 2012/10/01 06:20:09 jsing Exp $
--- src/cmd/go/pkg.go.orig Thu Jun 14 13:23:36 2012
+++ src/cmd/go/pkg.go Sat Sep 22 01:39:59 2012
@@ -494,11 +494,15 @@ func isStale(p *Package, topRoot map[string]bool) bool
// the linker. This heuristic will not work if the binaries are back-dated,
// as some binary distributions may do, but it does handle a very
// common case. See issue 3036.
- if olderThan(buildToolchain.compiler()) {
- return true
- }
- if p.build.IsCommand() && olderThan(buildToolchain.linker()) {
- return true
+ // Assume that code in $GOROOT is up to date, as it might not be
+ // writeable. See issue 4106.
+ if p.Root != goroot {
+ if olderThan(buildToolchain.compiler()) {
+ return true
+ }
+ if p.build.IsCommand() && olderThan(buildToolchain.linker()) {
+ return true
+ }
}
// Have installed copy, probably built using current compilers,