mirror of
https://github.com/containers/podman.git
synced 2025-09-27 08:43:52 +08:00
manifest: rm should not remove referenced images.
Following PR makes sure that `podman manifest rm <list>` only removes the named manifest list and not referenced images. Bumping and squashing c/common to v0.43.3-0.20210902095222-a7acc160fb25 in same commit in order to make sure build commit test passes. Signed-off-by: Aditya Rajan <arajan@redhat.com>
This commit is contained in:
5
vendor/github.com/containers/common/libimage/image.go
generated
vendored
5
vendor/github.com/containers/common/libimage/image.go
generated
vendored
@ -74,7 +74,10 @@ func (i *Image) isCorrupted(name string) error {
|
||||
}
|
||||
|
||||
if _, err := ref.NewImage(context.Background(), nil); err != nil {
|
||||
return errors.Errorf("Image %s exists in local storage but may be corrupted: %v", name, err)
|
||||
if name == "" {
|
||||
name = i.ID()[:12]
|
||||
}
|
||||
return errors.Errorf("Image %s exists in local storage but may be corrupted (remove the image to resolve the issue): %v", name, err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user