From 0ee9a3129b312e0a40b2e78e97ee356205495333 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Sat, 27 Aug 2022 13:40:50 +0200 Subject: podman rmi: emit untag events Emit untag events for each tag when removing an image. Fixes: #15485 Signed-off-by: Valentin Rothberg --- vendor/github.com/containers/common/libimage/image.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'vendor/github.com') diff --git a/vendor/github.com/containers/common/libimage/image.go b/vendor/github.com/containers/common/libimage/image.go index d1548eb23..3cc843ed3 100644 --- a/vendor/github.com/containers/common/libimage/image.go +++ b/vendor/github.com/containers/common/libimage/image.go @@ -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 -- cgit v1.2.3-54-g00ecf