From 6e66b16abeebfe620cb3cb2303638ab60d7d51a7 Mon Sep 17 00:00:00 2001
From: Andrew Gerrand <adg@golang.org>
Date: Sun, 14 Aug 2011 10:52:20 +1000
Subject: [PATCH] goinstall: report all newly-installed public packages

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/4875048
---
 src/cmd/goinstall/main.go | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/cmd/goinstall/main.go b/src/cmd/goinstall/main.go
index 86e490e24a..910ab7090a 100644
--- a/src/cmd/goinstall/main.go
+++ b/src/cmd/goinstall/main.go
@@ -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)
-- 
2.30.9