aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@redhat.com>2022-05-19 13:46:10 +0200
committerMatthew Heon <mheon@redhat.com>2022-06-14 13:50:03 -0400
commit7c2f8733edae8b1bc55ad9bb1011592869b630df (patch)
tree0378c9caa4a74c24c4bcfb71023de11df18aa198 /pkg
parentf4f3a4afd971d1729894bb77a10fc8e691094e32 (diff)
downloadpodman-7c2f8733edae8b1bc55ad9bb1011592869b630df.tar.gz
podman-7c2f8733edae8b1bc55ad9bb1011592869b630df.tar.bz2
podman-7c2f8733edae8b1bc55ad9bb1011592869b630df.zip
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>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/autoupdate/autoupdate.go3
1 files changed, 3 insertions, 0 deletions
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)