From 015dbdabedfdd78d273abf084cd9c65b7975ed0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Mon, 14 Oct 2024 20:40:56 +0200 Subject: [PATCH] DO NOT MERGE: Include UNMERGED https://github.com/containers/image/pull/2595 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miloslav Trmač --- go.mod | 2 ++ go.sum | 4 ++-- .../containers/image/v5/storage/storage_reference.go | 4 +++- vendor/modules.txt | 3 ++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index db0e08f0f..f16a4869f 100644 --- a/go.mod +++ b/go.mod @@ -136,3 +136,5 @@ require ( google.golang.org/grpc v1.66.0 // indirect google.golang.org/protobuf v1.34.2 // indirect ) + +replace github.com/containers/image/v5 => github.com/mtrmac/image/v5 v5.0.0-20241025210653-3a743783a632 diff --git a/go.sum b/go.sum index 0fe47df62..09c608a1d 100644 --- a/go.sum +++ b/go.sum @@ -39,8 +39,6 @@ github.com/containerd/stargz-snapshotter/estargz v0.15.1 h1:eXJjw9RbkLFgioVaTG+G github.com/containerd/stargz-snapshotter/estargz v0.15.1/go.mod h1:gr2RNwukQ/S9Nv33Lt6UC7xEx58C+LHRdoqbEKjz1Kk= github.com/containers/common v0.60.4 h1:H5+LAMHPZEqX6vVNOQ+IguVsaFl8kbO/SZ/VPXjxhy0= github.com/containers/common v0.60.4/go.mod h1:I0upBi1qJX3QmzGbUOBN1LVP6RvkKhd3qQpZbQT+Q54= -github.com/containers/image/v5 v5.32.3-0.20241025210258-94e0c4fd8e9d h1:85nEVd7gWGP2I35hHHjF/3zYPnLI+VKvsxRsYKBOb9k= -github.com/containers/image/v5 v5.32.3-0.20241025210258-94e0c4fd8e9d/go.mod h1:mMysUPpcUwWuq2EgENF+GLr4nrKBPOUcKZnJ0SpdxEA= github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 h1:Qzk5C6cYglewc+UyGf6lc8Mj2UaPTHy/iF2De0/77CA= github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01/go.mod h1:9rfv8iPl1ZP7aqh9YA68wnZv2NUDbXdcdPHVz0pFbPY= github.com/containers/ocicrypt v1.2.0 h1:X14EgRK3xNFvJEfI5O4Qn4T3E25ANudSOZz/sirVuPM= @@ -229,6 +227,8 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/mtrmac/image/v5 v5.0.0-20241025210653-3a743783a632 h1:OR/PD40jPL0Q1vqjwxg2bvodZwybwKonhvSxBN/JhmQ= +github.com/mtrmac/image/v5 v5.0.0-20241025210653-3a743783a632/go.mod h1:mMysUPpcUwWuq2EgENF+GLr4nrKBPOUcKZnJ0SpdxEA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= diff --git a/vendor/github.com/containers/image/v5/storage/storage_reference.go b/vendor/github.com/containers/image/v5/storage/storage_reference.go index acc4cb30e..5775c4acb 100644 --- a/vendor/github.com/containers/image/v5/storage/storage_reference.go +++ b/vendor/github.com/containers/image/v5/storage/storage_reference.go @@ -153,7 +153,9 @@ func (s *storageReference) resolveImage(sys *types.SystemContext) (*storage.Imag } if s.id == "" { logrus.Debugf("reference %q does not resolve to an image ID", s.StringWithinTransport()) - return nil, fmt.Errorf("reference %q does not resolve to an image ID: %w", s.StringWithinTransport(), ErrNoSuchImage) + // %.0w makes the error visible to error.Unwrap() without including any text. + // ErrNoSuchImage ultimately is “identifier is not an image”, which is not helpful for identifying the root cause. + return nil, fmt.Errorf("reference %q does not resolve to an image ID%.0w", s.StringWithinTransport(), ErrNoSuchImage) } if loadedImage == nil { img, err := s.transport.store.Image(s.id) diff --git a/vendor/modules.txt b/vendor/modules.txt index 73f1186c2..5f990ebd5 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -73,7 +73,7 @@ github.com/containers/common/pkg/password github.com/containers/common/pkg/report github.com/containers/common/pkg/report/camelcase github.com/containers/common/pkg/retry -# github.com/containers/image/v5 v5.32.3-0.20241025210258-94e0c4fd8e9d +# github.com/containers/image/v5 v5.32.3-0.20241025210258-94e0c4fd8e9d => github.com/mtrmac/image/v5 v5.0.0-20241025210653-3a743783a632 ## explicit; go 1.22.6 github.com/containers/image/v5/copy github.com/containers/image/v5/directory @@ -774,3 +774,4 @@ google.golang.org/protobuf/types/known/timestamppb # gopkg.in/yaml.v3 v3.0.1 ## explicit gopkg.in/yaml.v3 +# github.com/containers/image/v5 => github.com/mtrmac/image/v5 v5.0.0-20241025210653-3a743783a632