Explorar o código

Fork osext and support Solaris

Jakob Borg %!s(int64=11) %!d(string=hai) anos
pai
achega
8f9b8a8550

+ 4 - 5
Godeps/Godeps.json

@@ -5,11 +5,6 @@
 		"./cmd/..."
 	],
 	"Deps": [
-		{
-			"ImportPath": "bitbucket.org/kardianos/osext",
-			"Comment": "null-13",
-			"Rev": "5d3ddcf53a508cc2f7404eaebf546ef2cb5cdb6e"
-		},
 		{
 			"ImportPath": "code.google.com/p/go.crypto/bcrypt",
 			"Comment": "null-216",
@@ -39,6 +34,10 @@
 			"ImportPath": "github.com/bkaradzic/go-lz4",
 			"Rev": "93a831dcee242be64a9cc9803dda84af25932de7"
 		},
+		{
+			"ImportPath": "github.com/calmh/osext",
+			"Rev": "9bf61584e5f1f172e8766ddc9022d9c401faaa5e"
+		},
 		{
 			"ImportPath": "github.com/calmh/xdr",
 			"Rev": "a597b63b87d6140f79084c8aab214b4d533833a1"

+ 0 - 0
Godeps/_workspace/src/bitbucket.org/kardianos/osext/LICENSE → Godeps/_workspace/src/github.com/calmh/osext/LICENSE


+ 0 - 0
Godeps/_workspace/src/bitbucket.org/kardianos/osext/osext.go → Godeps/_workspace/src/github.com/calmh/osext/osext.go


+ 0 - 0
Godeps/_workspace/src/bitbucket.org/kardianos/osext/osext_plan9.go → Godeps/_workspace/src/github.com/calmh/osext/osext_plan9.go


+ 4 - 1
Godeps/_workspace/src/bitbucket.org/kardianos/osext/osext_procfs.go → Godeps/_workspace/src/github.com/calmh/osext/osext_procfs.go

@@ -2,12 +2,13 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build linux netbsd openbsd
+// +build linux netbsd openbsd solaris
 
 package osext
 
 import (
 	"errors"
+	"fmt"
 	"os"
 	"runtime"
 )
@@ -20,6 +21,8 @@ func executable() (string, error) {
 		return os.Readlink("/proc/curproc/exe")
 	case "openbsd":
 		return os.Readlink("/proc/curproc/file")
+	case "solaris":
+		return os.Readlink(fmt.Sprintf("/proc/%d/path/a.out", os.Getpid()))
 	}
 	return "", errors.New("ExecPath not implemented for " + runtime.GOOS)
 }

+ 0 - 0
Godeps/_workspace/src/bitbucket.org/kardianos/osext/osext_sysctl.go → Godeps/_workspace/src/github.com/calmh/osext/osext_sysctl.go


+ 0 - 0
Godeps/_workspace/src/bitbucket.org/kardianos/osext/osext_test.go → Godeps/_workspace/src/github.com/calmh/osext/osext_test.go


+ 0 - 0
Godeps/_workspace/src/bitbucket.org/kardianos/osext/osext_windows.go → Godeps/_workspace/src/github.com/calmh/osext/osext_windows.go


+ 1 - 1
internal/upgrade/upgrade_common.go

@@ -10,7 +10,7 @@ import (
 	"strconv"
 	"strings"
 
-	"bitbucket.org/kardianos/osext"
+	"github.com/calmh/osext"
 )
 
 type Release struct {

+ 1 - 1
internal/upgrade/upgrade_supported.go

@@ -2,7 +2,7 @@
 // All rights reserved. Use of this source code is governed by an MIT-style
 // license that can be found in the LICENSE file.
 
-// +build !solaris,!windows,!noupgrade
+// +build !windows,!noupgrade
 
 package upgrade
 

+ 1 - 1
internal/upgrade/upgrade_unsupp.go

@@ -2,7 +2,7 @@
 // All rights reserved. Use of this source code is governed by an MIT-style
 // license that can be found in the LICENSE file.
 
-// +build solaris noupgrade
+// +build noupgrade
 
 package upgrade