summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-02-27 17:39:13 +0100
committerGitHub <noreply@github.com>2019-02-27 17:39:13 +0100
commitf1f26f444228381224581609a327f13158740923 (patch)
tree724d87cdcc26839cb155a0ce5c52dc4ede0d88c0 /cmd/podman
parentfd16be5c00533e5237bfaa640e5afb4b45d29aa5 (diff)
parentffefbda6943028119d43e1f5f9e4e9fb541f5e89 (diff)
downloadpodman-f1f26f444228381224581609a327f13158740923.tar.gz
podman-f1f26f444228381224581609a327f13158740923.tar.bz2
podman-f1f26f444228381224581609a327f13158740923.zip
Merge pull request #2465 from mheon/fix_build_varlink
Fix build for non-Varlink-tagged Podman
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/rmi.go19
1 files changed, 3 insertions, 16 deletions
diff --git a/cmd/podman/rmi.go b/cmd/podman/rmi.go
index 0963b1328..e5bb9b486 100644
--- a/cmd/podman/rmi.go
+++ b/cmd/podman/rmi.go
@@ -5,8 +5,6 @@ import (
"os"
"github.com/containers/libpod/cmd/podman/cliconfig"
- "github.com/containers/libpod/cmd/podman/varlink"
- "github.com/containers/libpod/libpod/image"
"github.com/containers/libpod/pkg/adapter"
"github.com/containers/storage"
"github.com/pkg/errors"
@@ -31,17 +29,6 @@ var (
}
)
-func imageNotFound(err error) bool {
- if errors.Cause(err) == image.ErrNoSuchImage {
- return true
- }
- switch err.(type) {
- case *iopodman.ImageNotFound:
- return true
- }
- return false
-}
-
func init() {
rmiCommand.Command = _rmiCommand
rmiCommand.SetUsageTemplate(UsageTemplate())
@@ -80,7 +67,7 @@ func rmiCmd(c *cliconfig.RmiValues) error {
if errors.Cause(err) == storage.ErrImageUsedByContainer {
fmt.Printf("A container associated with containers/storage, i.e. via Buildah, CRI-O, etc., may be associated with this image: %-12.12s\n", img.ID())
}
- if !imageNotFound(err) {
+ if !adapter.IsImageNotFound(err) {
failureCnt++
}
if lastError != nil {
@@ -135,7 +122,7 @@ func rmiCmd(c *cliconfig.RmiValues) error {
newImage, err := runtime.NewImageFromLocal(i)
if err != nil {
if lastError != nil {
- if !imageNotFound(lastError) {
+ if !adapter.IsImageNotFound(lastError) {
failureCnt++
}
fmt.Fprintln(os.Stderr, lastError)
@@ -147,7 +134,7 @@ func rmiCmd(c *cliconfig.RmiValues) error {
}
}
- if imageNotFound(lastError) && failureCnt == 0 {
+ if adapter.IsImageNotFound(lastError) && failureCnt == 0 {
exitCode = 1
}