From d66288315df4d756295aaa2f4a98a36b309c2554 Mon Sep 17 00:00:00 2001
From: Valentin Rothberg <vrothberg@redhat.com>
Date: Thu, 19 May 2022 13:46:10 +0200
Subject: auto update: create an event

Create an auto-update event for each invocation, independent if images
and containers are updated or not.  Those events will be indicated in
the events already but users will now know why.

Fixes: #14283
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
---
 pkg/autoupdate/autoupdate.go | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'pkg')

diff --git a/pkg/autoupdate/autoupdate.go b/pkg/autoupdate/autoupdate.go
index ee530528e..0c795faed 100644
--- a/pkg/autoupdate/autoupdate.go
+++ b/pkg/autoupdate/autoupdate.go
@@ -12,6 +12,7 @@ import (
 	"github.com/containers/image/v5/transports/alltransports"
 	"github.com/containers/podman/v4/libpod"
 	"github.com/containers/podman/v4/libpod/define"
+	"github.com/containers/podman/v4/libpod/events"
 	"github.com/containers/podman/v4/pkg/domain/entities"
 	"github.com/containers/podman/v4/pkg/systemd"
 	systemdDefine "github.com/containers/podman/v4/pkg/systemd/define"
@@ -142,6 +143,8 @@ func AutoUpdate(ctx context.Context, runtime *libpod.Runtime, options entities.A
 	}
 	defer conn.Close()
 
+	runtime.NewSystemEvent(events.AutoUpdate)
+
 	// Update all images/container according to their auto-update policy.
 	var allReports []*entities.AutoUpdateReport
 	updatedRawImages := make(map[string]bool)
-- 
cgit v1.2.3-54-g00ecf