Merge pull request #17431 from vdemeester/hope-it-does-not-broke-everything-again

Another try at dockerversion placeholder for library import
Upstream-commit: 58b270c338e831ac6668a29788c72d202f9fc251
Component: engine
This commit is contained in:
David Calavera
2015-11-09 13:15:50 -08:00
23 changed files with 81 additions and 61 deletions
+2 -2
View File
@@ -12,8 +12,8 @@ import (
"syscall"
"github.com/Sirupsen/logrus"
"github.com/docker/docker/autogen/dockerversion"
"github.com/docker/docker/daemon/graphdriver"
"github.com/docker/docker/dockerversion"
derr "github.com/docker/docker/errors"
"github.com/docker/docker/pkg/fileutils"
"github.com/docker/docker/pkg/idtools"
@@ -279,7 +279,7 @@ func migrateIfDownlevel(driver graphdriver.Driver, root string) error {
}
func configureSysInit(config *Config, rootUID, rootGID int) (string, error) {
localCopy := filepath.Join(config.Root, "init", fmt.Sprintf("dockerinit-%s", dockerversion.VERSION))
localCopy := filepath.Join(config.Root, "init", fmt.Sprintf("dockerinit-%s", dockerversion.Version))
sysInitPath := utils.DockerInitPath(localCopy)
if sysInitPath == "" {
return "", fmt.Errorf("Could not locate dockerinit: This usually means docker was built incorrectly. See https://docs.docker.com/project/set-up-dev-env/ for official build instructions.")
@@ -8,8 +8,8 @@ import (
"sync"
"github.com/Sirupsen/logrus"
"github.com/docker/docker/autogen/dockerversion"
"github.com/docker/docker/daemon/execdriver"
"github.com/docker/docker/dockerversion"
"github.com/docker/docker/pkg/parsers"
)
@@ -24,7 +24,7 @@ var forceKill bool
// Define name and version for windows
var (
DriverName = "Windows 1854"
Version = dockerversion.VERSION + " " + dockerversion.GITCOMMIT
Version = dockerversion.Version + " " + dockerversion.GitCommit
)
type activeContainer struct {
@@ -16,8 +16,8 @@ import (
"time"
"github.com/Sirupsen/logrus"
"github.com/docker/docker/autogen/dockerversion"
"github.com/docker/docker/daemon/graphdriver"
"github.com/docker/docker/dockerversion"
"github.com/docker/docker/image"
"github.com/docker/docker/pkg/archive"
"github.com/docker/docker/pkg/chrootarchive"
@@ -440,7 +440,7 @@ func (d *Driver) RestoreCustomImages(tagger graphdriver.Tagger, recorder graphdr
img := &image.Image{
ID: id,
Created: imageData.CreatedTime,
DockerVersion: dockerversion.VERSION,
DockerVersion: dockerversion.Version,
Architecture: runtime.GOARCH,
OS: runtime.GOOS,
Size: imageData.Size,
+3 -3
View File
@@ -7,7 +7,7 @@ import (
"github.com/Sirupsen/logrus"
"github.com/docker/docker/api/types"
"github.com/docker/docker/autogen/dockerversion"
"github.com/docker/docker/dockerversion"
"github.com/docker/docker/pkg/fileutils"
"github.com/docker/docker/pkg/parsers/kernel"
"github.com/docker/docker/pkg/parsers/operatingsystem"
@@ -83,14 +83,14 @@ func (daemon *Daemon) SystemInfo() (*types.Info, error) {
OperatingSystem: operatingSystem,
IndexServerAddress: registry.IndexServer,
RegistryConfig: daemon.RegistryService.Config,
InitSha1: dockerversion.INITSHA1,
InitSha1: dockerversion.InitSHA1,
InitPath: initPath,
NCPU: runtime.NumCPU(),
MemTotal: meminfo.MemTotal,
DockerRootDir: daemon.config().Root,
Labels: daemon.config().Labels,
ExperimentalBuild: utils.ExperimentalBuild(),
ServerVersion: dockerversion.VERSION,
ServerVersion: dockerversion.Version,
ClusterStore: daemon.config().ClusterStore,
ClusterAdvertise: daemon.config().ClusterAdvertise,
}
@@ -18,8 +18,8 @@ import (
"github.com/aws/aws-sdk-go/aws/ec2metadata"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/cloudwatchlogs"
"github.com/docker/docker/autogen/dockerversion"
"github.com/docker/docker/daemon/logger"
"github.com/docker/docker/dockerversion"
)
const (
@@ -150,7 +150,7 @@ func newAWSLogsClient(ctx logger.Context) (api, error) {
currentAgent := r.HTTPRequest.Header.Get(userAgentHeader)
r.HTTPRequest.Header.Set(userAgentHeader,
fmt.Sprintf("Docker %s (%s) %s",
dockerversion.VERSION, runtime.GOOS, currentAgent))
dockerversion.Version, runtime.GOOS, currentAgent))
},
})
return client, nil
@@ -13,8 +13,8 @@ import (
"github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/cloudwatchlogs"
"github.com/docker/docker/autogen/dockerversion"
"github.com/docker/docker/daemon/logger"
"github.com/docker/docker/dockerversion"
)
const (
@@ -48,7 +48,7 @@ func TestNewAWSLogsClientUserAgentHandler(t *testing.T) {
}
buildHandlerList.Run(request)
expectedUserAgentString := fmt.Sprintf("Docker %s (%s) %s/%s",
dockerversion.VERSION, runtime.GOOS, aws.SDKName, aws.SDKVersion)
dockerversion.Version, runtime.GOOS, aws.SDKName, aws.SDKVersion)
userAgent := request.HTTPRequest.Header.Get("User-Agent")
if userAgent != expectedUserAgentString {
t.Errorf("Wrong User-Agent string, expected \"%s\" but was \"%s\"",