2e92b42e5b
OBS-URL: https://build.opensuse.org/request/show/348297 OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/go?expand=0&rev=240
34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
Index: go/src/cmd/go/build.go
|
|
===================================================================
|
|
--- go.orig/src/cmd/go/build.go
|
|
+++ go/src/cmd/go/build.go
|
|
@@ -153,6 +153,7 @@ func init() {
|
|
}
|
|
|
|
// 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
|
|
@@ -209,6 +210,8 @@ func init() {
|
|
// addBuildFlags adds the flags common to the build, clean, get,
|
|
// install, list, run, and test commands.
|
|
func addBuildFlags(cmd *Command) {
|
|
+ // OPENSUSE
|
|
+ cmd.Flag.BoolVar(&buildS, "s", false, "")
|
|
cmd.Flag.BoolVar(&buildA, "a", false, "")
|
|
cmd.Flag.BoolVar(&buildN, "n", false, "")
|
|
cmd.Flag.IntVar(&buildP, "p", buildP, "")
|
|
@@ -1502,6 +1505,11 @@ func (b *builder) linkShared(a *action)
|
|
|
|
// install is the action for installing a single package or executable.
|
|
func (b *builder) install(a *action) (err error) {
|
|
+ // OPENSUSE
|
|
+ if buildS && (a.p.Standard || a.p.ImportPath == "cmd/cgo") {
|
|
+ return nil
|
|
+ }
|
|
+
|
|
defer func() {
|
|
if err != nil && err != errPrintedOutput {
|
|
err = fmt.Errorf("go install %s: %v", a.p.ImportPath, err)
|