2014-06-20 00:54:31 +02:00
|
|
|
Index: go/src/cmd/go/build.go
|
|
|
|
===================================================================
|
|
|
|
--- go.orig/src/cmd/go/build.go
|
|
|
|
+++ go/src/cmd/go/build.go
|
2015-12-22 15:58:30 +01:00
|
|
|
@@ -153,6 +153,7 @@ func init() {
|
2012-01-28 17:28:41 +01:00
|
|
|
}
|
2012-01-25 04:57:43 +01:00
|
|
|
|
2012-01-28 17:28:41 +01:00
|
|
|
// Flags set by multiple commands.
|
|
|
|
+var buildS bool // OPENSUSE -s (for packaging only)
|
|
|
|
var buildA bool // -a flag
|
|
|
|
var buildN bool // -n flag
|
|
|
|
var buildP = runtime.NumCPU() // -p flag
|
2015-12-22 15:58:30 +01:00
|
|
|
@@ -209,6 +210,8 @@ func init() {
|
2015-08-22 16:58:04 +02:00
|
|
|
// addBuildFlags adds the flags common to the build, clean, get,
|
2014-06-20 00:54:31 +02:00
|
|
|
// install, list, run, and test commands.
|
2012-01-28 17:28:41 +01:00
|
|
|
func addBuildFlags(cmd *Command) {
|
2012-01-25 04:57:43 +01:00
|
|
|
+ // OPENSUSE
|
|
|
|
+ cmd.Flag.BoolVar(&buildS, "s", false, "")
|
2012-01-28 17:28:41 +01:00
|
|
|
cmd.Flag.BoolVar(&buildA, "a", false, "")
|
|
|
|
cmd.Flag.BoolVar(&buildN, "n", false, "")
|
|
|
|
cmd.Flag.IntVar(&buildP, "p", buildP, "")
|
2015-12-22 15:58:30 +01:00
|
|
|
@@ -1502,6 +1505,11 @@ func (b *builder) linkShared(a *action)
|
2012-01-25 04:57:43 +01:00
|
|
|
|
2012-02-04 11:55:47 +01:00
|
|
|
// install is the action for installing a single package or executable.
|
2012-03-27 08:59:50 +02:00
|
|
|
func (b *builder) install(a *action) (err error) {
|
2012-02-04 11:55:47 +01:00
|
|
|
+ // OPENSUSE
|
|
|
|
+ if buildS && (a.p.Standard || a.p.ImportPath == "cmd/cgo") {
|
|
|
|
+ return nil
|
|
|
|
+ }
|
|
|
|
+
|
2012-03-27 08:59:50 +02:00
|
|
|
defer func() {
|
|
|
|
if err != nil && err != errPrintedOutput {
|
|
|
|
err = fmt.Errorf("go install %s: %v", a.p.ImportPath, err)
|