mirror of
https://github.com/containers/podman.git
synced 2025-11-01 10:45:52 +08:00
vendor c/common@852ca05a1f
Also force an update of c/image to prevent a downgrade. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
15
vendor/github.com/containers/common/libimage/pull.go
generated
vendored
15
vendor/github.com/containers/common/libimage/pull.go
generated
vendored
@ -116,10 +116,6 @@ func (r *Runtime) Pull(ctx context.Context, name string, pullPolicy config.PullP
|
||||
return nil, fmt.Errorf("pulling all tags is not supported for %s transport", ref.Transport().Name())
|
||||
}
|
||||
|
||||
if r.eventChannel != nil {
|
||||
defer r.writeEvent(&Event{ID: "", Name: name, Time: time.Now(), Type: EventTypeImagePull})
|
||||
}
|
||||
|
||||
// Some callers may set the platform via the system context at creation
|
||||
// time of the runtime. We need this information to decide whether we
|
||||
// need to enforce pulling from a registry (see
|
||||
@ -160,10 +156,10 @@ func (r *Runtime) Pull(ctx context.Context, name string, pullPolicy config.PullP
|
||||
}
|
||||
|
||||
localImages := []*Image{}
|
||||
for _, name := range pulledImages {
|
||||
image, _, err := r.LookupImage(name, nil)
|
||||
for _, iName := range pulledImages {
|
||||
image, _, err := r.LookupImage(iName, nil)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("locating pulled image %q name in containers storage: %w", name, err)
|
||||
return nil, fmt.Errorf("locating pulled image %q name in containers storage: %w", iName, err)
|
||||
}
|
||||
|
||||
// Note that we can ignore the 2nd return value here. Some
|
||||
@ -184,6 +180,11 @@ func (r *Runtime) Pull(ctx context.Context, name string, pullPolicy config.PullP
|
||||
}
|
||||
}
|
||||
|
||||
if r.eventChannel != nil {
|
||||
// Note that we use the input name here to preserve the transport data.
|
||||
r.writeEvent(&Event{ID: image.ID(), Name: name, Time: time.Now(), Type: EventTypeImagePull})
|
||||
}
|
||||
|
||||
localImages = append(localImages, image)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user