aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2017-10-28 11:53:38 +0000
committerRuss Cox <rsc@golang.org>2017-10-28 11:53:49 +0000
commit47c868dc1c92fcd75ca1574cc5a5fae4797e2271 (patch)
tree58ead49fbecfd74cde3c0b6b0c27a70cb1ba1485
parent013ca842aa1414e3f6c6448d4269c22ce690087e (diff)
downloadgo-47c868dc1c92fcd75ca1574cc5a5fae4797e2271.tar.xz
Revert "cmd/dist: translate /private/var to /var on darwin builders"
This reverts commit 4f2ee4997470c84a55d89d097e6b8fc45680978f. Reason for revert: broke mobile builders. Change-Id: I9fd3ef777ce6401c0c28b03f1dc53ddcdbef5111 Reviewed-on: https://go-review.googlesource.com/74170 Reviewed-by: Russ Cox <rsc@golang.org>
-rw-r--r--src/cmd/dist/build.go17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
index cc0c9af643..2d4b575a83 100644
--- a/src/cmd/dist/build.go
+++ b/src/cmd/dist/build.go
@@ -12,7 +12,6 @@ import (
"os"
"os/exec"
"path/filepath"
- "runtime"
"sort"
"strings"
"sync"
@@ -101,22 +100,6 @@ func xinit() {
}
goroot = filepath.Clean(b)
- if runtime.GOOS == "darwin" && strings.HasPrefix(goroot, "/private/") {
- // The builders don't set $PWD correctly during make.bash
- // but then they apparently do set it or perhaps $GOROOT
- // during run.bash. During make.bash we infer that
- // GOROOT=/private/var/blah/blah but then during run.bash
- // apparently GOROOT=/var/blah/blah. This makes all commands
- // seem out of date, which breaks some tests.
- // Instead of finding the problem in the builders, fix it here.
- // This is not great but is the best we can do today.
- f1, err1 := os.Stat(goroot)
- f2, err2 := os.Stat(strings.TrimPrefix(goroot, "/private"))
- if err1 == nil && err2 == nil && os.SameFile(f1, f2) {
- goroot = strings.TrimPrefix(goroot, "/private")
- }
- }
-
b = os.Getenv("GOROOT_FINAL")
if b == "" {
b = goroot