diff options
author | baude <bbaude@redhat.com> | 2018-01-08 12:57:37 -0600 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-01-08 20:12:20 +0000 |
commit | c246b9d24f27c9ef020a044eee95ffc440145146 (patch) | |
tree | 3b9f6c98e0b9fb4ca986c472392e7e833874ac1a /libpod | |
parent | 3d05f100f7be78932242d3d09a88e4a6236a0d3c (diff) | |
download | podman-c246b9d24f27c9ef020a044eee95ffc440145146.tar.gz podman-c246b9d24f27c9ef020a044eee95ffc440145146.tar.bz2 podman-c246b9d24f27c9ef020a044eee95ffc440145146.zip |
Shortname deletion continued
With certain short name usages, rmi still was unable to delete
certain images. This was also reflected in several commit tests
that were temporarily disabled.
Signed-off-by: baude <bbaude@redhat.com>
Closes: #200
Approved by: rhatdan
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/runtime_img.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/runtime_img.go b/libpod/runtime_img.go index 66630beb2..671e08c19 100644 --- a/libpod/runtime_img.go +++ b/libpod/runtime_img.go @@ -347,6 +347,7 @@ func getTags(nameInput string) (reference.NamedTagged, bool, error) { func (k *Image) GetLocalImageName() (string, error) { _, err := k.runtime.GetImage(k.Name) if err == nil { + k.LocalName = k.Name return k.Name, nil } localImages, err := k.runtime.GetImages(&ImageFilterParams{}) @@ -359,6 +360,7 @@ func (k *Image) GetLocalImageName() (string, error) { } for _, image := range localImages { if strings.HasPrefix(image.ID, k.Name) { + k.ID = image.ID return image.ID, nil } for _, name := range image.Names { @@ -379,11 +381,13 @@ func (k *Image) GetLocalImageName() (string, error) { } if imageName == k.Name { + k.LocalName = name return name, nil } imageSplit := strings.Split(imageName, "/") baseName := imageSplit[len(imageSplit)-1] if baseName == k.Name { + k.LocalName = name return name, nil } } |