From bdb10cf821c421b1dcf4a0ed438a264765a3542e Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Mon, 10 Nov 2014 10:42:45 +1100 Subject: [PATCH] go.tools/dashboard/builder: rewrite sub-repo paths before 'go get' and 'go test' The dashboard still uses the old "code.google.com/p/go.*" import paths. Rewrite them to the new "golang.org/x/*" before running 'go get' and 'go test'. Update golang/go#9079. LGTM=rsc R=rsc, bradfitz CC=golang-codereviews https://golang.org/cl/174740043 --- dashboard/builder/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dashboard/builder/main.go b/dashboard/builder/main.go index a5caf087..ef7bf4e5 100644 --- a/dashboard/builder/main.go +++ b/dashboard/builder/main.go @@ -581,6 +581,9 @@ func (b *Builder) buildSubrepo(goRoot, goPath, pkg, hash string) (string, error) env[i] = p + filepath.Join(goRoot, "bin") + sep + filepath.Join(goPath, "bin") + sep + e[len(p):] } + // HACK: check out to new sub-repo location instead of old location. + pkg = strings.Replace(pkg, "code.google.com/p/go.", "golang.org/x/", 1) + // fetch package and dependencies var outbuf bytes.Buffer err := run(exec.Command(goTool, "get", "-d", pkg+"/..."), runEnv(env), allOutput(&outbuf), runDir(goPath))