aboutsummaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2019-01-14 03:49:08 +0100
committerMiloslav Trmač <mitr@redhat.com>2019-01-14 03:55:44 +0100
commita6e668fac54b8dcc34b9810738b22fa7c8561325 (patch)
tree996fb1c9eb984dee1f5fa730334b524627137d07 /libpod
parent140ae25c4d0c7ba89a0bb7ae16f81f90d20be535 (diff)
downloadpodman-a6e668fac54b8dcc34b9810738b22fa7c8561325.tar.gz
podman-a6e668fac54b8dcc34b9810738b22fa7c8561325.tar.bz2
podman-a6e668fac54b8dcc34b9810738b22fa7c8561325.zip
Don't call image.DecomposeString in imageInListToContainerImage
- It is used to fill Repository(misnamed)/Tag members which have no users; so it's completely unclear why this is useful. - Given the mishandling of tags by imageParts.tag, at the very least all new code should primarily use reference.Named (even if after a decompose() to internally deal with unqualified names first), introducing new uses of original decompose() just reintroduces known trouble - so without any provided rationale, reverting seems a reasonable default action. - This drags in all of libpod/image into the "remote client" build, which seems undesirable. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/adapter/runtime_remote.go18
1 files changed, 5 insertions, 13 deletions
diff --git a/libpod/adapter/runtime_remote.go b/libpod/adapter/runtime_remote.go
index 0fe5c449a..27301d90b 100644
--- a/libpod/adapter/runtime_remote.go
+++ b/libpod/adapter/runtime_remote.go
@@ -5,13 +5,13 @@ package adapter
import (
"context"
"fmt"
- "github.com/containers/libpod/cmd/podman/varlink"
- "github.com/containers/libpod/libpod/image"
- "github.com/opencontainers/go-digest"
- "github.com/urfave/cli"
- "github.com/varlink/go/varlink"
"strings"
"time"
+
+ iopodman "github.com/containers/libpod/cmd/podman/varlink"
+ digest "github.com/opencontainers/go-digest"
+ "github.com/urfave/cli"
+ "github.com/varlink/go/varlink"
)
// ImageRuntime is wrapper for image runtime
@@ -59,8 +59,6 @@ type remoteImage struct {
RepoDigests []string
Parent string
Size int64
- Tag string
- Repository string
Created time.Time
InputName string
Names []string
@@ -91,10 +89,6 @@ func (r *LocalRuntime) GetImages() ([]*ContainerImage, error) {
}
func imageInListToContainerImage(i iopodman.ImageInList, name string, runtime *LocalRuntime) (*ContainerImage, error) {
- imageParts, err := image.DecomposeString(name)
- if err != nil {
- return nil, err
- }
created, err := splitStringDate(i.Created)
if err != nil {
return nil, err
@@ -108,8 +102,6 @@ func imageInListToContainerImage(i iopodman.ImageInList, name string, runtime *L
Parent: i.ParentId,
Size: i.Size,
Created: created,
- Tag: imageParts.Tag,
- Repository: imageParts.Registry,
Names: i.RepoTags,
isParent: i.IsParent,
Runtime: runtime,