Skip to content

Commit

Permalink
Merge pull request containers#663 from vrothberg/0.38-backports
Browse files Browse the repository at this point in the history
0.38 backports
  • Loading branch information
openshift-merge-robot authored Jul 2, 2021
2 parents 9a71278 + 5e4622a commit 9904ee5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions libimage/filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ func (r *Runtime) compileImageFilters(ctx context.Context, filters []string) ([]
switch key {

case "after", "since":
img, _, err := r.LookupImage(value, nil)
img, _, err := r.LookupImage(value, &LookupImageOptions{IgnorePlatform: true})
if err != nil {
return nil, errors.Wrapf(err, "could not find local image for filter %q", filter)
}
filterFuncs = append(filterFuncs, filterAfter(img.Created()))

case "before":
img, _, err := r.LookupImage(value, nil)
img, _, err := r.LookupImage(value, &LookupImageOptions{IgnorePlatform: true})
if err != nil {
return nil, errors.Wrapf(err, "could not find local image for filter %q", filter)
}
Expand Down
5 changes: 2 additions & 3 deletions libimage/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (r *Runtime) Pull(ctx context.Context, name string, pullPolicy config.PullP
if pullPolicy == config.PullPolicyAlways {
return nil, errors.Errorf("pull policy is always but image has been referred to by ID (%s)", name)
}
local, _, err := r.LookupImage(name, nil)
local, _, err := r.LookupImage(name, &LookupImageOptions{IgnorePlatform: true})
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -136,9 +136,8 @@ func (r *Runtime) Pull(ctx context.Context, name string, pullPolicy config.PullP
}

localImages := []*Image{}
lookupOptions := &LookupImageOptions{IgnorePlatform: true}
for _, name := range pulledImages {
local, _, err := r.LookupImage(name, lookupOptions)
local, _, err := r.LookupImage(name, &LookupImageOptions{IgnorePlatform: true})
if err != nil {
return nil, errors.Wrapf(err, "error locating pulled image %q name in containers storage", name)
}
Expand Down
4 changes: 2 additions & 2 deletions libimage/save.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (r *Runtime) Save(ctx context.Context, names []string, format, path string,
// saveSingleImage saves the specified image name to the specified path.
// Supported formats are "oci-archive", "oci-dir" and "docker-dir".
func (r *Runtime) saveSingleImage(ctx context.Context, name, format, path string, options *SaveOptions) error {
image, imageName, err := r.LookupImage(name, nil)
image, imageName, err := r.LookupImage(name, &LookupImageOptions{IgnorePlatform: true})
if err != nil {
return err
}
Expand Down Expand Up @@ -155,7 +155,7 @@ func (r *Runtime) saveDockerArchive(ctx context.Context, names []string, path st
visitedNames := make(map[string]bool) // filters duplicate names
for _, name := range names {
// Look up local images.
image, imageName, err := r.LookupImage(name, nil)
image, imageName, err := r.LookupImage(name, &LookupImageOptions{IgnorePlatform: true})
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package version

// Version is the version of the build.
const Version = "0.38.14-dev"
const Version = "0.38.15-dev"

0 comments on commit 9904ee5

Please sign in to comment.