mirror of
https://github.com/containers/podman.git
synced 2025-12-09 23:27:09 +08:00
bump containers/image to v5.0.0, buildah to v1.11.4
Move to containers/image v5 and containers/buildah to v1.11.4. Replace an equality check with a type assertion when checking for a docker.ErrUnauthorizedForCredentials in `podman login`. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
4
vendor/github.com/containers/buildah/imagebuildah/build.go
generated
vendored
4
vendor/github.com/containers/buildah/imagebuildah/build.go
generated
vendored
@@ -13,8 +13,8 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/containers/buildah"
|
||||
"github.com/containers/image/v4/docker/reference"
|
||||
"github.com/containers/image/v4/types"
|
||||
"github.com/containers/image/v5/docker/reference"
|
||||
"github.com/containers/image/v5/types"
|
||||
"github.com/containers/storage"
|
||||
"github.com/containers/storage/pkg/archive"
|
||||
"github.com/opencontainers/runc/libcontainer/configs"
|
||||
|
||||
10
vendor/github.com/containers/buildah/imagebuildah/executor.go
generated
vendored
10
vendor/github.com/containers/buildah/imagebuildah/executor.go
generated
vendored
@@ -12,11 +12,11 @@ import (
|
||||
|
||||
"github.com/containers/buildah"
|
||||
"github.com/containers/buildah/util"
|
||||
"github.com/containers/image/v4/docker/reference"
|
||||
is "github.com/containers/image/v4/storage"
|
||||
"github.com/containers/image/v4/transports"
|
||||
"github.com/containers/image/v4/transports/alltransports"
|
||||
"github.com/containers/image/v4/types"
|
||||
"github.com/containers/image/v5/docker/reference"
|
||||
is "github.com/containers/image/v5/storage"
|
||||
"github.com/containers/image/v5/transports"
|
||||
"github.com/containers/image/v5/transports/alltransports"
|
||||
"github.com/containers/image/v5/types"
|
||||
"github.com/containers/storage"
|
||||
"github.com/containers/storage/pkg/archive"
|
||||
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
|
||||
23
vendor/github.com/containers/buildah/imagebuildah/stage_executor.go
generated
vendored
23
vendor/github.com/containers/buildah/imagebuildah/stage_executor.go
generated
vendored
@@ -13,12 +13,12 @@ import (
|
||||
"github.com/containers/buildah"
|
||||
buildahdocker "github.com/containers/buildah/docker"
|
||||
"github.com/containers/buildah/util"
|
||||
cp "github.com/containers/image/v4/copy"
|
||||
"github.com/containers/image/v4/docker/reference"
|
||||
"github.com/containers/image/v4/manifest"
|
||||
is "github.com/containers/image/v4/storage"
|
||||
"github.com/containers/image/v4/transports"
|
||||
"github.com/containers/image/v4/types"
|
||||
cp "github.com/containers/image/v5/copy"
|
||||
"github.com/containers/image/v5/docker/reference"
|
||||
"github.com/containers/image/v5/manifest"
|
||||
is "github.com/containers/image/v5/storage"
|
||||
"github.com/containers/image/v5/transports"
|
||||
"github.com/containers/image/v5/types"
|
||||
"github.com/containers/storage"
|
||||
"github.com/containers/storage/pkg/archive"
|
||||
securejoin "github.com/cyphar/filepath-securejoin"
|
||||
@@ -759,6 +759,12 @@ func (s *StageExecutor) Execute(ctx context.Context, stage imagebuilder.Stage, b
|
||||
s.executor.log(commitMessage)
|
||||
}
|
||||
}
|
||||
logCacheHit := func(cacheID string) {
|
||||
if !s.executor.quiet {
|
||||
cacheHitMessage := "--> Using cache"
|
||||
fmt.Fprintf(s.executor.out, "%s %s\n", cacheHitMessage, cacheID)
|
||||
}
|
||||
}
|
||||
logImageID := func(imgID string) {
|
||||
if s.executor.iidfile == "" {
|
||||
fmt.Fprintf(s.executor.out, "%s\n", imgID)
|
||||
@@ -816,6 +822,9 @@ func (s *StageExecutor) Execute(ctx context.Context, stage imagebuilder.Stage, b
|
||||
if strings.Contains(n, "--from") && (command == "COPY" || command == "ADD") {
|
||||
var mountPoint string
|
||||
arr := strings.Split(n, "=")
|
||||
if len(arr) != 2 {
|
||||
return "", nil, errors.Errorf("%s: invalid --from flag, should be --from=<name|index>", command)
|
||||
}
|
||||
otherStage, ok := s.executor.stages[arr[1]]
|
||||
if !ok {
|
||||
if mountPoint, err = s.getImageRootfs(ctx, stage, arr[1]); err != nil {
|
||||
@@ -906,7 +915,7 @@ func (s *StageExecutor) Execute(ctx context.Context, stage imagebuilder.Stage, b
|
||||
}
|
||||
if cacheID != "" {
|
||||
// Note the cache hit.
|
||||
fmt.Fprintf(s.executor.out, "--> Using cache %s\n", cacheID)
|
||||
logCacheHit(cacheID)
|
||||
} else {
|
||||
// We're not going to find any more cache hits.
|
||||
checkForLayers = false
|
||||
|
||||
11
vendor/github.com/containers/buildah/imagebuildah/util.go
generated
vendored
11
vendor/github.com/containers/buildah/imagebuildah/util.go
generated
vendored
@@ -23,8 +23,15 @@ func cloneToDirectory(url, dir string) error {
|
||||
if !strings.HasPrefix(url, "git://") && !strings.HasSuffix(url, ".git") {
|
||||
url = "git://" + url
|
||||
}
|
||||
logrus.Debugf("cloning %q to %q", url, dir)
|
||||
cmd := exec.Command("git", "clone", url, dir)
|
||||
gitBranch := strings.Split(url, "#")
|
||||
var cmd *exec.Cmd
|
||||
if len(gitBranch) < 2 {
|
||||
logrus.Debugf("cloning %q to %q", url, dir)
|
||||
cmd = exec.Command("git", "clone", url, dir)
|
||||
} else {
|
||||
logrus.Debugf("cloning repo %q and branch %q to %q", gitBranch[0], gitBranch[1], dir)
|
||||
cmd = exec.Command("git", "clone", "-b", gitBranch[1], gitBranch[0], dir)
|
||||
}
|
||||
return cmd.Run()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user