summaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/containers/common/libimage/download.go4
-rw-r--r--vendor/github.com/containers/common/libimage/image.go16
-rw-r--r--vendor/github.com/containers/common/libimage/runtime.go3
-rw-r--r--vendor/github.com/containers/common/version/version.go2
-rw-r--r--vendor/modules.txt2
5 files changed, 16 insertions, 11 deletions
diff --git a/vendor/github.com/containers/common/libimage/download.go b/vendor/github.com/containers/common/libimage/download.go
index 5ea11f084..54edf1b9a 100644
--- a/vendor/github.com/containers/common/libimage/download.go
+++ b/vendor/github.com/containers/common/libimage/download.go
@@ -11,7 +11,7 @@ import (
)
// tmpdir returns a path to a temporary directory.
-func (r *Runtime) tmpdir() string {
+func tmpdir() string {
tmpdir := os.Getenv("TMPDIR")
if tmpdir == "" {
tmpdir = "/var/tmp"
@@ -25,7 +25,7 @@ func (r *Runtime) tmpdir() string {
func (r *Runtime) downloadFromURL(source string) (string, error) {
fmt.Printf("Downloading from %q\n", source)
- outFile, err := ioutil.TempFile(r.tmpdir(), "import")
+ outFile, err := ioutil.TempFile(r.systemContext.BigFilesTemporaryDir, "import")
if err != nil {
return "", errors.Wrap(err, "error creating file")
}
diff --git a/vendor/github.com/containers/common/libimage/image.go b/vendor/github.com/containers/common/libimage/image.go
index de0b4b2c5..3bcdbabec 100644
--- a/vendor/github.com/containers/common/libimage/image.go
+++ b/vendor/github.com/containers/common/libimage/image.go
@@ -329,17 +329,19 @@ func (i *Image) remove(ctx context.Context, rmMap map[string]*RemoveImageReport,
// an `rmi foo` will not untag "foo" but instead attempt to remove the
// entire image. If there's a container using "foo", we should get an
// error.
- if options.Force || referencedBy == "" || numNames == 1 {
+ if referencedBy == "" || numNames == 1 {
// DO NOTHING, the image will be removed
} else {
byID := strings.HasPrefix(i.ID(), referencedBy)
byDigest := strings.HasPrefix(referencedBy, "sha256:")
- if byID && numNames > 1 {
- return errors.Errorf("unable to delete image %q by ID with more than one tag (%s): please force removal", i.ID(), i.Names())
- } else if byDigest && numNames > 1 {
- // FIXME - Docker will remove the digest but containers storage
- // does not support that yet, so our hands are tied.
- return errors.Errorf("unable to delete image %q by digest with more than one tag (%s): please force removal", i.ID(), i.Names())
+ if !options.Force {
+ if byID && numNames > 1 {
+ return errors.Errorf("unable to delete image %q by ID with more than one tag (%s): please force removal", i.ID(), i.Names())
+ } else if byDigest && numNames > 1 {
+ // FIXME - Docker will remove the digest but containers storage
+ // does not support that yet, so our hands are tied.
+ return errors.Errorf("unable to delete image %q by digest with more than one tag (%s): please force removal", i.ID(), i.Names())
+ }
}
// Only try to untag if we know it's not an ID or digest.
diff --git a/vendor/github.com/containers/common/libimage/runtime.go b/vendor/github.com/containers/common/libimage/runtime.go
index 93a42eb55..efa182544 100644
--- a/vendor/github.com/containers/common/libimage/runtime.go
+++ b/vendor/github.com/containers/common/libimage/runtime.go
@@ -84,6 +84,9 @@ func RuntimeFromStore(store storage.Store, options *RuntimeOptions) (*Runtime, e
} else {
systemContext = types.SystemContext{}
}
+ if systemContext.BigFilesTemporaryDir == "" {
+ systemContext.BigFilesTemporaryDir = tmpdir()
+ }
setRegistriesConfPath(&systemContext)
diff --git a/vendor/github.com/containers/common/version/version.go b/vendor/github.com/containers/common/version/version.go
index e8e3d72fe..6c899987a 100644
--- a/vendor/github.com/containers/common/version/version.go
+++ b/vendor/github.com/containers/common/version/version.go
@@ -1,4 +1,4 @@
package version
// Version is the version of the build.
-const Version = "0.40.0"
+const Version = "0.40.1-dev"
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 6f16f03b9..913076526 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -93,7 +93,7 @@ github.com/containers/buildah/pkg/overlay
github.com/containers/buildah/pkg/parse
github.com/containers/buildah/pkg/rusage
github.com/containers/buildah/util
-# github.com/containers/common v0.40.0
+# github.com/containers/common v0.40.1-0.20210617134614-c6578d76fb0d
github.com/containers/common/libimage
github.com/containers/common/libimage/manifests
github.com/containers/common/pkg/apparmor