aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorW. Trevor King <wking@tremily.us>2019-01-08 21:46:20 -0800
committerAtomic Bot <atomic-devel@projectatomic.io>2019-01-09 22:29:18 +0000
commit0f6535cf6b4bfac265983c2fdd3482310ab4f39b (patch)
tree16bc07796a80a1ab567a86d089ebc08f5ea8366c /cmd/podman
parenta60090cfba3674c5c1223b270c5f46600e6ee07e (diff)
downloadpodman-0f6535cf6b4bfac265983c2fdd3482310ab4f39b.tar.gz
podman-0f6535cf6b4bfac265983c2fdd3482310ab4f39b.tar.bz2
podman-0f6535cf6b4bfac265983c2fdd3482310ab4f39b.zip
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 <wking@tremily.us> Closes: #2106 Approved by: rhatdan
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/sign.go5
1 files changed, 4 insertions, 1 deletions
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