]> Cypherpunks repositories - gostls13.git/commitdiff
goinstall: report all newly-installed public packages
authorAndrew Gerrand <adg@golang.org>
Sun, 14 Aug 2011 00:52:20 +0000 (10:52 +1000)
committerAndrew Gerrand <adg@golang.org>
Sun, 14 Aug 2011 00:52:20 +0000 (10:52 +1000)
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4875048

src/cmd/goinstall/main.go

index 86e490e24a5e441ba09e8319c304afff12edec30..910ab7090a47c1962d057c165a7dd4ec0e0d7798 100644 (file)
@@ -196,9 +196,17 @@ func install(pkg, parent string) {
        }
        // Download remote packages if not found or forced with -u flag.
        remote, public := isRemote(pkg), false
-       if remote && (err == build.ErrNotFound || (err == nil && *update)) {
-               printf("%s: download\n", pkg)
-               public, err = download(pkg, tree.SrcDir())
+       if remote {
+               if err == build.ErrNotFound || (err == nil && *update) {
+                       // Download remote package.
+                       printf("%s: download\n", pkg)
+                       public, err = download(pkg, tree.SrcDir())
+               } else {
+                       // Test if this is a public repository
+                       // (for reporting to dashboard).
+                       m, _ := findPublicRepo(pkg)
+                       public = m != nil
+               }
        }
        if err != nil {
                errorf("%s: %v\n", pkg, err)