From 0f6535cf6b4bfac265983c2fdd3482310ab4f39b Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 8 Jan 2019 21:46:20 -0800 Subject: libpod/image: Use ParseNormalizedNamed in RepoDigests Avoid generating quay.io/openshift-release-dev/ocp-release@sha256@sha256:239... and similar when the image name is already digest-based [1]. It's not clear exactly how we get into this state, but as shown by the unit tests, the new code handles this case correctly (while the previous code does not). [1]: https://github.com/containers/libpod/issues/2086 Signed-off-by: W. Trevor King Closes: #2106 Approved by: rhatdan --- cmd/podman/sign.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'cmd/podman/sign.go') diff --git a/cmd/podman/sign.go b/cmd/podman/sign.go index 790b6031d..8a31ddb98 100644 --- a/cmd/podman/sign.go +++ b/cmd/podman/sign.go @@ -126,7 +126,10 @@ func signCmd(c *cli.Context) error { sigStoreDir = SignatureStoreDir } - repos := newImage.RepoDigests() + repos, err := newImage.RepoDigests() + if err != nil { + return errors.Wrapf(err, "error calculating repo digests for %s", signimage) + } if len(repos) == 0 { logrus.Errorf("no repodigests associated with the image %s", signimage) continue -- cgit v1.2.3-54-g00ecf