summaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-06-20 07:54:39 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-06-20 13:13:16 +0000
commitda29c52c1523b955442308a3d01560fe2c6baad5 (patch)
treec67543fb9250c663fc72806e990fa37c2ad8332e /vendor
parentf228cf73e0318f48c94ec4cd1b9b3115cfbb763a (diff)
downloadpodman-da29c52c1523b955442308a3d01560fe2c6baad5.tar.gz
podman-da29c52c1523b955442308a3d01560fe2c6baad5.tar.bz2
podman-da29c52c1523b955442308a3d01560fe2c6baad5.zip
Vendor containers/storage for better error reporting on dups
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #971 Approved by: mheon
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/containers/storage/containers.go4
-rw-r--r--vendor/github.com/containers/storage/containers_ffjson.go1
-rw-r--r--vendor/github.com/containers/storage/pkg/directory/directory_unix.go2
3 files changed, 5 insertions, 2 deletions
diff --git a/vendor/github.com/containers/storage/containers.go b/vendor/github.com/containers/storage/containers.go
index ec54a502e..ebc1e99a0 100644
--- a/vendor/github.com/containers/storage/containers.go
+++ b/vendor/github.com/containers/storage/containers.go
@@ -2,6 +2,7 @@ package storage
import (
"encoding/json"
+ "fmt"
"io/ioutil"
"os"
"path/filepath"
@@ -278,7 +279,8 @@ func (r *containerStore) Create(id string, names []string, image, layer, metadat
names = dedupeNames(names)
for _, name := range names {
if _, nameInUse := r.byname[name]; nameInUse {
- return nil, ErrDuplicateName
+ return nil, errors.Wrapf(ErrDuplicateName,
+ fmt.Sprintf("the container name \"%s\" is already in use by \"%s\". You have to remove that container to be able to reuse that name.", name, r.byname[name].ID))
}
}
if err == nil {
diff --git a/vendor/github.com/containers/storage/containers_ffjson.go b/vendor/github.com/containers/storage/containers_ffjson.go
index aef6becfe..6e83808d4 100644
--- a/vendor/github.com/containers/storage/containers_ffjson.go
+++ b/vendor/github.com/containers/storage/containers_ffjson.go
@@ -1,5 +1,6 @@
// Code generated by ffjson <https://github.com/pquerna/ffjson>. DO NOT EDIT.
// source: containers.go
+//
package storage
diff --git a/vendor/github.com/containers/storage/pkg/directory/directory_unix.go b/vendor/github.com/containers/storage/pkg/directory/directory_unix.go
index 397251bdb..05522d68b 100644
--- a/vendor/github.com/containers/storage/pkg/directory/directory_unix.go
+++ b/vendor/github.com/containers/storage/pkg/directory/directory_unix.go
@@ -1,4 +1,4 @@
-// +build linux freebsd solaris
+// +build linux darwin freebsd solaris
package directory