diff --git a/go.mod b/go.mod index 2a352efd29..1972b570c4 100644 --- a/go.mod +++ b/go.mod @@ -137,3 +137,5 @@ require ( google.golang.org/grpc v1.67.0 // indirect google.golang.org/protobuf v1.35.1 // indirect ) + +replace github.com/containers/image/v5 => github.com/mtrmac/image/v5 v5.0.0-20241119161415-175ffae56f37 diff --git a/go.sum b/go.sum index d590e33126..84284b55f1 100644 --- a/go.sum +++ b/go.sum @@ -43,8 +43,6 @@ github.com/containerd/typeurl/v2 v2.2.0 h1:6NBDbQzr7I5LHgp34xAXYF5DOTQDn05X58lsP github.com/containerd/typeurl/v2 v2.2.0/go.mod h1:8XOOxnyatxSWuG8OfsZXVnAF4iZfedjS/8UHSPJnX4g= github.com/containers/common v0.61.0 h1:j/84PTqZIKKYy42OEJsZmjZ4g4Kq2ERuC3tqp2yWdh4= github.com/containers/common v0.61.0/go.mod h1:NGRISq2vTFPSbhNqj6MLwyes4tWSlCnqbJg7R77B8xc= -github.com/containers/image/v5 v5.33.1-0.20241118232835-b706d9353c22 h1:LOOuQWN4NCPZ4FYJDywoyEguKHZU64ipBz0LZwRgt10= -github.com/containers/image/v5 v5.33.1-0.20241118232835-b706d9353c22/go.mod h1:sYYpCezsfxAFMu5+9iXBNTJDe0A+6gT75ra3o7m2lm4= 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= @@ -233,6 +231,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-20241119161415-175ffae56f37 h1:/MgbX6xkwHZF03XBEPSEdXUyV1Di4k5MSTWa9bmd9B0= +github.com/mtrmac/image/v5 v5.0.0-20241119161415-175ffae56f37/go.mod h1:sYYpCezsfxAFMu5+9iXBNTJDe0A+6gT75ra3o7m2lm4= 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 acc4cb30e8..5775c4acbc 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 30596279d6..c0979e8437 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -81,7 +81,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.33.1-0.20241118232835-b706d9353c22 +# github.com/containers/image/v5 v5.33.1-0.20241118232835-b706d9353c22 => github.com/mtrmac/image/v5 v5.0.0-20241119161415-175ffae56f37 ## explicit; go 1.22.8 github.com/containers/image/v5/copy github.com/containers/image/v5/directory @@ -778,3 +778,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-20241119161415-175ffae56f37