From: Russ Cox Date: Mon, 30 May 2011 22:23:16 +0000 (-0400) Subject: goinstall: skip standard packages X-Git-Tag: weekly.2011-06-02~60 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=2c6a2a9773282a82a476146746b5e3a4da875822;p=gostls13.git goinstall: skip standard packages R=adg, n13m3y3r CC=golang-dev https://golang.org/cl/4526084 --- diff --git a/src/cmd/goinstall/main.go b/src/cmd/goinstall/main.go index 6cd92907a4..ffa37aa417 100644 --- a/src/cmd/goinstall/main.go +++ b/src/cmd/goinstall/main.go @@ -131,6 +131,11 @@ func logPackage(pkg string) { // install installs the package named by path, which is needed by parent. func install(pkg, parent string) { + if isStandardPath(pkg) { + visit[pkg] = done + return + } + // Make sure we're not already trying to install pkg. switch visit[pkg] { case done: @@ -160,9 +165,6 @@ func install(pkg, parent string) { if isLocalPath(pkg) { dir = pkg local = true - } else if isStandardPath(pkg) { - dir = filepath.Join(root, filepath.FromSlash(pkg)) - local = true } else { proot = findPkgroot(pkg) err := download(pkg, proot.srcDir())