podman rmi: emit untag events

Emit untag events for each tag when removing an image.

Fixes: #15485
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2022-08-27 13:40:50 +02:00
parent 36cf6f572a
commit 0ee9a3129b
5 changed files with 11 additions and 6 deletions

View File

@ -475,7 +475,11 @@ func (i *Image) removeRecursive(ctx context.Context, rmMap map[string]*RemoveIma
}
return processedIDs, err
}
report.Untagged = append(report.Untagged, i.Names()...)
for _, name := range i.Names() {
i.runtime.writeEvent(&Event{ID: i.ID(), Name: name, Time: time.Now(), Type: EventTypeImageUntag})
}
if !hasChildren {
report.Removed = true