diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2021-07-01 11:27:04 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2021-07-01 11:27:04 +0200 |
commit | 6ecedc161804e84bf7454bbe147389680b4b8032 (patch) | |
tree | 0e4702be43ff94631a06764ce8d5dc29fc3bf626 /vendor | |
parent | fbb4e5ebc83b7e969f8d7993c8e9b27145d2be46 (diff) | |
download | podman-6ecedc161804e84bf7454bbe147389680b4b8032.tar.gz podman-6ecedc161804e84bf7454bbe147389680b4b8032.tar.bz2 podman-6ecedc161804e84bf7454bbe147389680b4b8032.zip |
vendor containers/common@v0.38.13
* libimage: events: deferred write
Fixes: bugzilla.redhat.com/show_bug.cgi?id=1977673
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'vendor')
8 files changed, 13 insertions, 13 deletions
diff --git a/vendor/github.com/containers/common/libimage/image.go b/vendor/github.com/containers/common/libimage/image.go index 4349e9bab..4f7a22cb8 100644 --- a/vendor/github.com/containers/common/libimage/image.go +++ b/vendor/github.com/containers/common/libimage/image.go @@ -298,7 +298,7 @@ func (i *Image) remove(ctx context.Context, rmMap map[string]*RemoveImageReport, } if i.runtime.eventChannel != nil { - i.runtime.writeEvent(&Event{ID: i.ID(), Name: referencedBy, Time: time.Now(), Type: EventTypeImageRemove}) + defer i.runtime.writeEvent(&Event{ID: i.ID(), Name: referencedBy, Time: time.Now(), Type: EventTypeImageRemove}) } // Check if already visisted this image. @@ -450,7 +450,7 @@ func (i *Image) Tag(name string) error { logrus.Debugf("Tagging image %s with %q", i.ID(), ref.String()) if i.runtime.eventChannel != nil { - i.runtime.writeEvent(&Event{ID: i.ID(), Name: name, Time: time.Now(), Type: EventTypeImageTag}) + defer i.runtime.writeEvent(&Event{ID: i.ID(), Name: name, Time: time.Now(), Type: EventTypeImageTag}) } newNames := append(i.Names(), ref.String()) @@ -484,7 +484,7 @@ func (i *Image) Untag(name string) error { logrus.Debugf("Untagging %q from image %s", ref.String(), i.ID()) if i.runtime.eventChannel != nil { - i.runtime.writeEvent(&Event{ID: i.ID(), Name: name, Time: time.Now(), Type: EventTypeImageUntag}) + defer i.runtime.writeEvent(&Event{ID: i.ID(), Name: name, Time: time.Now(), Type: EventTypeImageUntag}) } removedName := false @@ -626,7 +626,7 @@ func (i *Image) RepoDigests() ([]string, error) { // evaluated path to the mount point. func (i *Image) Mount(ctx context.Context, mountOptions []string, mountLabel string) (string, error) { if i.runtime.eventChannel != nil { - i.runtime.writeEvent(&Event{ID: i.ID(), Name: "", Time: time.Now(), Type: EventTypeImageMount}) + defer i.runtime.writeEvent(&Event{ID: i.ID(), Name: "", Time: time.Now(), Type: EventTypeImageMount}) } mountPoint, err := i.runtime.store.MountImage(i.ID(), mountOptions, mountLabel) @@ -671,7 +671,7 @@ func (i *Image) Mountpoint() (string, error) { // unmount. func (i *Image) Unmount(force bool) error { if i.runtime.eventChannel != nil { - i.runtime.writeEvent(&Event{ID: i.ID(), Name: "", Time: time.Now(), Type: EventTypeImageUnmount}) + defer i.runtime.writeEvent(&Event{ID: i.ID(), Name: "", Time: time.Now(), Type: EventTypeImageUnmount}) } logrus.Debugf("Unmounted image %s", i.ID()) _, err := i.runtime.store.UnmountImage(i.ID(), force) diff --git a/vendor/github.com/containers/common/libimage/load.go b/vendor/github.com/containers/common/libimage/load.go index 856813356..33dc1a22f 100644 --- a/vendor/github.com/containers/common/libimage/load.go +++ b/vendor/github.com/containers/common/libimage/load.go @@ -25,7 +25,7 @@ func (r *Runtime) Load(ctx context.Context, path string, options *LoadOptions) ( logrus.Debugf("Loading image from %q", path) if r.eventChannel != nil { - r.writeEvent(&Event{ID: "", Name: path, Time: time.Now(), Type: EventTypeImageLoad}) + defer r.writeEvent(&Event{ID: "", Name: path, Time: time.Now(), Type: EventTypeImageLoad}) } var ( diff --git a/vendor/github.com/containers/common/libimage/manifest_list.go b/vendor/github.com/containers/common/libimage/manifest_list.go index e0673176c..73678131c 100644 --- a/vendor/github.com/containers/common/libimage/manifest_list.go +++ b/vendor/github.com/containers/common/libimage/manifest_list.go @@ -374,7 +374,7 @@ func (m *ManifestList) Push(ctx context.Context, destination string, options *Ma } if m.image.runtime.eventChannel != nil { - m.image.runtime.writeEvent(&Event{ID: m.ID(), Name: destination, Time: time.Now(), Type: EventTypeImagePush}) + defer m.image.runtime.writeEvent(&Event{ID: m.ID(), Name: destination, Time: time.Now(), Type: EventTypeImagePush}) } // NOTE: we're using the logic in copier to create a proper diff --git a/vendor/github.com/containers/common/libimage/pull.go b/vendor/github.com/containers/common/libimage/pull.go index 0d3a47020..eaa494e3b 100644 --- a/vendor/github.com/containers/common/libimage/pull.go +++ b/vendor/github.com/containers/common/libimage/pull.go @@ -93,7 +93,7 @@ func (r *Runtime) Pull(ctx context.Context, name string, pullPolicy config.PullP } if r.eventChannel != nil { - r.writeEvent(&Event{ID: "", Name: name, Time: time.Now(), Type: EventTypeImagePull}) + defer r.writeEvent(&Event{ID: "", Name: name, Time: time.Now(), Type: EventTypeImagePull}) } // Some callers may set the platform via the system context at creation diff --git a/vendor/github.com/containers/common/libimage/push.go b/vendor/github.com/containers/common/libimage/push.go index a5e0cc11a..1896b796f 100644 --- a/vendor/github.com/containers/common/libimage/push.go +++ b/vendor/github.com/containers/common/libimage/push.go @@ -65,7 +65,7 @@ func (r *Runtime) Push(ctx context.Context, source, destination string, options } if r.eventChannel != nil { - r.writeEvent(&Event{ID: image.ID(), Name: destination, Time: time.Now(), Type: EventTypeImagePush}) + defer r.writeEvent(&Event{ID: image.ID(), Name: destination, Time: time.Now(), Type: EventTypeImagePush}) } // Buildah compat: Make sure to tag the destination image if it's a diff --git a/vendor/github.com/containers/common/libimage/save.go b/vendor/github.com/containers/common/libimage/save.go index 7afde6e17..e1b8c3f75 100644 --- a/vendor/github.com/containers/common/libimage/save.go +++ b/vendor/github.com/containers/common/libimage/save.go @@ -80,7 +80,7 @@ func (r *Runtime) saveSingleImage(ctx context.Context, name, format, path string } if r.eventChannel != nil { - r.writeEvent(&Event{ID: image.ID(), Name: path, Time: time.Now(), Type: EventTypeImageSave}) + defer r.writeEvent(&Event{ID: image.ID(), Name: path, Time: time.Now(), Type: EventTypeImageSave}) } // Unless the image was referenced by ID, use the resolved name as a @@ -183,7 +183,7 @@ func (r *Runtime) saveDockerArchive(ctx context.Context, names []string, path st } localImages[image.ID()] = local if r.eventChannel != nil { - r.writeEvent(&Event{ID: image.ID(), Name: path, Time: time.Now(), Type: EventTypeImageSave}) + defer r.writeEvent(&Event{ID: image.ID(), Name: path, Time: time.Now(), Type: EventTypeImageSave}) } } diff --git a/vendor/github.com/containers/common/version/version.go b/vendor/github.com/containers/common/version/version.go index 6c0260346..c6a17f761 100644 --- a/vendor/github.com/containers/common/version/version.go +++ b/vendor/github.com/containers/common/version/version.go @@ -1,4 +1,4 @@ package version // Version is the version of the build. -const Version = "0.38.12" +const Version = "0.38.13" diff --git a/vendor/modules.txt b/vendor/modules.txt index 4752409b2..ec4838385 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -91,7 +91,7 @@ github.com/containers/buildah/pkg/overlay github.com/containers/buildah/pkg/parse github.com/containers/buildah/pkg/rusage github.com/containers/buildah/util -# github.com/containers/common v0.38.12 +# github.com/containers/common v0.38.13 github.com/containers/common/libimage github.com/containers/common/libimage/manifests github.com/containers/common/pkg/apparmor |