Bump github.com/containers/common from 0.38.4 to 0.39.0

Bumps [github.com/containers/common](https://github.com/containers/common) from 0.38.4 to 0.39.0.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.38.4...v0.39.0)

Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
dependabot[bot]
2021-05-26 06:27:00 +00:00
committed by GitHub
parent c5b3cba9c3
commit 568e911b84
15 changed files with 163 additions and 58 deletions

View File

@ -516,8 +516,9 @@ type RemoveImagesOptions struct {
WithSize bool
}
// RemoveImages removes images specified by names. All images are expected to
// exist in the local containers storage.
// RemoveImages removes images specified by names. If no names are specified,
// remove images as specified via the options' filters. All images are
// expected to exist in the local containers storage.
//
// If an image has more names than one name, the image will be untagged with
// the specified name. RemoveImages returns a slice of untagged and removed
@ -557,6 +558,9 @@ func (r *Runtime) RemoveImages(ctx context.Context, names []string, options *Rem
// orderedIDs and the deleteMap.
switch {
case len(names) > 0:
// Look up the images one-by-one. That allows for removing
// images that have been looked up successfully while reporting
// lookup errors at the end.
lookupOptions := LookupImageOptions{IgnorePlatform: true}
for _, name := range names {
img, resolvedName, err := r.LookupImage(name, &lookupOptions)