diff options
author | Andrew Gerrand <adg@golang.org> | 2011-06-21 17:13:16 +1000 |
---|---|---|
committer | Andrew Gerrand <adg@golang.org> | 2011-06-21 17:13:16 +1000 |
commit | f338d9f73b50436669e532200de27edeef1959b0 (patch) | |
tree | bc0d67ac0354e6a15c7f2c477bacc9d60f0ddf09 | |
parent | 524d02cbca4255ec4b524bb809f3c2e4cba30b0b (diff) | |
download | go-f338d9f73b50436669e532200de27edeef1959b0.tar.gz go-f338d9f73b50436669e532200de27edeef1959b0.zip |
goinstall: undo 1ad616fb313d (always rebuild...)
CL 4627051 is a better way of doing the same thing.
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4654045
-rw-r--r-- | src/cmd/goinstall/main.go | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/cmd/goinstall/main.go b/src/cmd/goinstall/main.go index aad3ca8635..64fae08688 100644 --- a/src/cmd/goinstall/main.go +++ b/src/cmd/goinstall/main.go @@ -150,7 +150,7 @@ func logPackage(pkg string) { } // install installs the package named by path, which is needed by parent. -func install(pkg, parent string) (built bool) { +func install(pkg, parent string) { // Make sure we're not already trying to install pkg. switch visit[pkg] { case done: @@ -201,12 +201,9 @@ func install(pkg, parent string) (built bool) { errorf("%s: package has no files\n", pkg) return } - var depBuilt bool for _, p := range dirInfo.Imports { if p != "C" { - if install(p, pkg) { - depBuilt = true - } + install(p, pkg) } } if errors { @@ -227,13 +224,12 @@ func install(pkg, parent string) (built bool) { script.Clean() } if *doInstall { - if depBuilt || script.Stale() { + if script.Stale() { printf("%s: install\n", pkg) if err := script.Run(); err != nil { errorf("%s: install: %v\n", pkg, err) return } - built = true } else { printf("%s: up-to-date\n", pkg) } |