]> Cypherpunks repositories - gostls13.git/commitdiff
goinstall: skip standard packages
authorRuss Cox <rsc@golang.org>
Mon, 30 May 2011 22:23:16 +0000 (18:23 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 30 May 2011 22:23:16 +0000 (18:23 -0400)
R=adg, n13m3y3r
CC=golang-dev
https://golang.org/cl/4526084

src/cmd/goinstall/main.go

index 6cd92907a4c21c4f93183b35c88c7a44f55058a9..ffa37aa417197d862a6b1c6882ef1f3c81702d19 100644 (file)
@@ -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())