From 1fb14c85197aa7145d08eca7f5540a01414dbbbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Vl=C3=A9rick?= Date: Sat, 24 Jun 2023 15:09:25 +0200 Subject: [PATCH] Fix empty image test - use the image digest and not its name --- oci/layout/oci_transport.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oci/layout/oci_transport.go b/oci/layout/oci_transport.go index f58f9b4dcd..653e35128c 100644 --- a/oci/layout/oci_transport.go +++ b/oci/layout/oci_transport.go @@ -279,7 +279,7 @@ func (ref ociReference) DeleteImage(ctx context.Context, sys *types.SystemContex newManifests := make([]imgspecv1.Descriptor, 0, len(index.Manifests)-1) for _, v := range index.Manifests { - if v.Annotations[imgspecv1.AnnotationRefName] != ref.image { + if v.Digest != descriptor.Digest { newManifests = append(newManifests, v) } }