mirror of
https://github.com/containers/podman.git
synced 2025-07-18 10:08:07 +08:00
Vendor in latests containers/common
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
11
vendor/github.com/containers/common/libimage/pull.go
generated
vendored
11
vendor/github.com/containers/common/libimage/pull.go
generated
vendored
@ -442,8 +442,17 @@ func (r *Runtime) imagesIDsForManifest(manifestBytes []byte, sys *types.SystemCo
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("listing images by manifest digest: %w", err)
|
||||
}
|
||||
results := make([]string, 0, len(images))
|
||||
|
||||
// If you have additionStores defined and the same image stored in
|
||||
// both storage and additional store, it can be output twice.
|
||||
// Fixes github.com/containers/podman/issues/18647
|
||||
results := []string{}
|
||||
imageMap := map[string]bool{}
|
||||
for _, image := range images {
|
||||
if imageMap[image.ID] {
|
||||
continue
|
||||
}
|
||||
imageMap[image.ID] = true
|
||||
results = append(results, image.ID)
|
||||
}
|
||||
if len(results) == 0 {
|
||||
|
Reference in New Issue
Block a user