Hello community,

here is the log from the commit of package libcontainers-common for 
openSUSE:Factory checked in at 2019-10-23 15:46:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libcontainers-common (Old)
 and      /work/SRC/openSUSE:Factory/.libcontainers-common.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libcontainers-common"

Wed Oct 23 15:46:54 2019 rev:20 rq:734519 version:20190923

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/libcontainers-common/libcontainers-common.changes    
    2019-09-30 15:50:35.898621881 +0200
+++ 
/work/SRC/openSUSE:Factory/.libcontainers-common.new.2352/libcontainers-common.changes
      2019-10-23 15:46:56.742441364 +0200
@@ -1,0 +2,35 @@
+Wed Oct  2 08:29:50 UTC 2019 - Sascha Grunert <[email protected]>
+
+- Update to image 4.0.0
+  - Add http response to log
+  - Add tests for parsing OpenShift kubeconfig files
+  - Compress: define some consts for the compression algos
+  - Compression: add support for the zstd
+  - Compression: allow to specify the compression format
+  - Copy: add nil checks
+  - Copy: compression: default to gzip
+  - Copy: don't lose annotations of BlobInfo
+  - Copy: fix options.DestinationCtx nil check
+  - Copy: use a bigger buffer for the compression
+  - Fix cross-compilation by vendoring latest c/storage
+  - Internal/testing/explicitfilepath-tmpdir: handle unset TMPDIR
+  - Keyctl: clean up after tests
+  - Make container tools work with go+openssl
+  - Make test-skopeo: replace c/image module instead of copying code
+  - Media type checks
+  - Move keyctl to internal & func remove auth from keyring
+  - Replace vendor.conf by go.mod
+  - Update dependencies
+  - Update test certificates
+  - Update to mergo v0.3.5
+  - Vendor.conf: update reference for containers/storage
+- Update to storage 1.13.4
+  - Update generated files
+  - ImageBigData: distinguish between no-such-image and no-such-item
+  - ImageSize: don't get tripped up by images with no layers
+  - tarlogger: disable raw accouting
+- Update to libpod 1.6.0
+  - Nothing changed regarding the OCI hooks documentation provided by this
+    package
+
+-------------------------------------------------------------------

Old:
----
  image-3.0.2.tar.xz
  libpod-1.5.1.tar.xz
  storage-1.13.2.tar.xz

New:
----
  image-4.0.0.tar.xz
  libpod-1.6.0.tar.xz
  storage-1.13.4.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libcontainers-common.spec ++++++
--- /var/tmp/diff_new_pack.gW08ct/_old  2019-10-23 15:46:58.834443625 +0200
+++ /var/tmp/diff_new_pack.gW08ct/_new  2019-10-23 15:46:58.846443638 +0200
@@ -16,13 +16,13 @@
 #
 
 # libpodver - version from containers/libpod
-%define libpodver 1.5.1
+%define libpodver 1.6.0
 
 # storagever - version from containers/storage
-%define storagever 1.13.2
+%define storagever 1.13.4
 
 # imagever - version from containers/image
-%define imagever 3.0.2
+%define imagever 4.0.0
 
 Name:           libcontainers-common
 Version:        20190923

++++++ _service ++++++
--- /var/tmp/diff_new_pack.gW08ct/_old  2019-10-23 15:46:58.942443742 +0200
+++ /var/tmp/diff_new_pack.gW08ct/_new  2019-10-23 15:46:58.946443746 +0200
@@ -4,24 +4,24 @@
 <param name="url">https://github.com/containers/storage.git</param>
 <param name="scm">git</param>
 <param name="filename">storage</param>
-<param name="versionformat">1.13.2</param>
-<param name="revision">v1.13.2</param>
+<param name="versionformat">1.13.4</param>
+<param name="revision">v1.13.4</param>
 </service>
 
 <service name="tar_scm" mode="disabled">
 <param name="url">https://github.com/containers/image.git</param>
 <param name="scm">git</param>
 <param name="filename">image</param>
-<param name="versionformat">3.0.2</param>
-<param name="revision">v3.0.2</param>
+<param name="versionformat">4.0.0</param>
+<param name="revision">v4.0.0</param>
 </service>
 
 <service name="tar_scm" mode="disabled">
 <param name="url">https://github.com/containers/libpod.git</param>
 <param name="scm">git</param>
 <param name="filename">libpod</param>
-<param name="versionformat">1.5.1</param>
-<param name="revision">v1.5.1</param>
+<param name="versionformat">1.6.0</param>
+<param name="revision">v1.6.0</param>
 </service>
 
 <service name="recompress" mode="disabled">

++++++ image-3.0.2.tar.xz -> image-4.0.0.tar.xz ++++++
++++ 3987 lines of diff (skipped)

++++++ libpod-1.5.1.tar.xz -> libpod-1.6.0.tar.xz ++++++
++++ 106876 lines of diff (skipped)

++++++ storage-1.13.2.tar.xz -> storage-1.13.4.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/storage-1.13.2/Makefile new/storage-1.13.4/Makefile
--- old/storage-1.13.2/Makefile 2019-08-09 20:42:40.000000000 +0200
+++ new/storage-1.13.4/Makefile 2019-09-30 11:01:22.000000000 +0200
@@ -1,4 +1,5 @@
 export GO111MODULE=off
+export GOPROXY=https://proxy.golang.org
 
 .PHONY: \
        all \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/storage-1.13.2/VERSION new/storage-1.13.4/VERSION
--- old/storage-1.13.2/VERSION  2019-08-09 20:42:40.000000000 +0200
+++ new/storage-1.13.4/VERSION  2019-09-30 11:01:22.000000000 +0200
@@ -1 +1 @@
-1.13.3-dev
+1.13.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/storage-1.13.2/cmd/containers-storage/create.go 
new/storage-1.13.4/cmd/containers-storage/create.go
--- old/storage-1.13.2/cmd/containers-storage/create.go 2019-08-09 
20:42:40.000000000 +0200
+++ new/storage-1.13.4/cmd/containers-storage/create.go 2019-09-30 
11:01:22.000000000 +0200
@@ -148,7 +148,10 @@
                }
                paramMetadata = string(b)
        }
-       layer := args[0]
+       layer := ""
+       if len(args) > 0 {
+               layer = args[0]
+       }
        imageOptions := &storage.ImageOptions{
                Digest: digest.Digest(paramDigest),
        }
@@ -251,7 +254,7 @@
                names:       []string{"create-image", "createimage"},
                optionsHelp: "[options [...]] topLayerNameOrID",
                usage:       "Create a new image using layers",
-               minArgs:     1,
+               minArgs:     0,
                maxArgs:     1,
                action:      createImage,
                addFlags: func(flags *mflag.FlagSet, cmd *command) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/storage-1.13.2/contrib/cirrus/lib.sh 
new/storage-1.13.4/contrib/cirrus/lib.sh
--- old/storage-1.13.2/contrib/cirrus/lib.sh    2019-08-09 20:42:40.000000000 
+0200
+++ new/storage-1.13.4/contrib/cirrus/lib.sh    2019-09-30 11:01:22.000000000 
+0200
@@ -64,7 +64,7 @@
 # Short list of packages or quick-running command
 SHORT_APTGET="timeout_attempt_delay_command 24s 5 30s $SUDOAPTGET"
 # Long list / long-running command
-LONG_APTGET="timeout_attempt_delay_command 300s 5 30s $SUDOAPTGET"
+LONG_APTGET="timeout_attempt_delay_command 300s 5 60s $SUDOAPTGET"
 
 # Pass in a list of one or more envariable names; exit non-zero with
 # helpful error message if any value is empty
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/storage-1.13.2/contrib/cirrus/setup.sh 
new/storage-1.13.4/contrib/cirrus/setup.sh
--- old/storage-1.13.2/contrib/cirrus/setup.sh  2019-08-09 20:42:40.000000000 
+0200
+++ new/storage-1.13.4/contrib/cirrus/setup.sh  2019-09-30 11:01:22.000000000 
+0200
@@ -27,7 +27,7 @@
         echo "Setting up $OS_RELEASE_ID $OS_RELEASE_VER"  # STUB: Add VM setup 
instructions here
         $SHORT_APTGET update  # Fetch latest package metadata
         $SHORT_APTGET -qq remove $AptBuildConflicts
-        $SHORT_APTGET -qq install $AptBuildRequires
+        $LONG_APTGET -qq install $AptBuildRequires
         install_fuse_overlayfs_from_git
         ;;
     *)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/storage-1.13.2/images.go new/storage-1.13.4/images.go
--- old/storage-1.13.2/images.go        2019-08-09 20:42:40.000000000 +0200
+++ new/storage-1.13.4/images.go        2019-09-30 11:01:22.000000000 +0200
@@ -372,7 +372,7 @@
        }
        image, ok := r.lookup(id)
        if !ok {
-               return ErrImageUnknown
+               return errors.Wrapf(ErrImageUnknown, "error locating image with 
ID %q", id)
        }
        delete(image.Flags, flag)
        return r.Save()
@@ -384,7 +384,7 @@
        }
        image, ok := r.lookup(id)
        if !ok {
-               return ErrImageUnknown
+               return errors.Wrapf(ErrImageUnknown, "error locating image with 
ID %q", id)
        }
        if image.Flags == nil {
                image.Flags = make(map[string]interface{})
@@ -456,14 +456,14 @@
                image.MappedTopLayers = append(image.MappedTopLayers, layer)
                return r.Save()
        }
-       return ErrImageUnknown
+       return errors.Wrapf(ErrImageUnknown, "error locating image with ID %q", 
id)
 }
 
 func (r *imageStore) Metadata(id string) (string, error) {
        if image, ok := r.lookup(id); ok {
                return image.Metadata, nil
        }
-       return "", ErrImageUnknown
+       return "", errors.Wrapf(ErrImageUnknown, "error locating image with ID 
%q", id)
 }
 
 func (r *imageStore) SetMetadata(id, metadata string) error {
@@ -474,7 +474,7 @@
                image.Metadata = metadata
                return r.Save()
        }
-       return ErrImageUnknown
+       return errors.Wrapf(ErrImageUnknown, "error locating image with ID %q", 
id)
 }
 
 func (r *imageStore) removeName(image *Image, name string) {
@@ -499,7 +499,7 @@
                image.Names = names
                return r.Save()
        }
-       return ErrImageUnknown
+       return errors.Wrapf(ErrImageUnknown, "error locating image with ID %q", 
id)
 }
 
 func (r *imageStore) Delete(id string) error {
@@ -508,7 +508,7 @@
        }
        image, ok := r.lookup(id)
        if !ok {
-               return ErrImageUnknown
+               return errors.Wrapf(ErrImageUnknown, "error locating image with 
ID %q", id)
        }
        id = image.ID
        toDeleteIndex := -1
@@ -551,14 +551,14 @@
        if image, ok := r.lookup(id); ok {
                return copyImage(image), nil
        }
-       return nil, ErrImageUnknown
+       return nil, errors.Wrapf(ErrImageUnknown, "error locating image with ID 
%q", id)
 }
 
 func (r *imageStore) Lookup(name string) (id string, err error) {
        if image, ok := r.lookup(name); ok {
                return image.ID, nil
        }
-       return "", ErrImageUnknown
+       return "", errors.Wrapf(ErrImageUnknown, "error locating image with ID 
%q", id)
 }
 
 func (r *imageStore) Exists(id string) bool {
@@ -570,7 +570,7 @@
        if images, ok := r.bydigest[d]; ok {
                return copyImageSlice(images), nil
        }
-       return nil, ErrImageUnknown
+       return nil, errors.Wrapf(ErrImageUnknown, "error locating image with 
digest %q", d)
 }
 
 func (r *imageStore) BigData(id, key string) ([]byte, error) {
@@ -579,7 +579,7 @@
        }
        image, ok := r.lookup(id)
        if !ok {
-               return nil, ErrImageUnknown
+               return nil, errors.Wrapf(ErrImageUnknown, "error locating image 
with ID %q", id)
        }
        return ioutil.ReadFile(r.datapath(image.ID, key))
 }
@@ -590,7 +590,7 @@
        }
        image, ok := r.lookup(id)
        if !ok {
-               return -1, ErrImageUnknown
+               return -1, errors.Wrapf(ErrImageUnknown, "error locating image 
with ID %q", id)
        }
        if image.BigDataSizes == nil {
                image.BigDataSizes = make(map[string]int64)
@@ -610,7 +610,7 @@
        }
        image, ok := r.lookup(id)
        if !ok {
-               return "", ErrImageUnknown
+               return "", errors.Wrapf(ErrImageUnknown, "error locating image 
with ID %q", id)
        }
        if image.BigDataDigests == nil {
                image.BigDataDigests = make(map[string]digest.Digest)
@@ -624,7 +624,7 @@
 func (r *imageStore) BigDataNames(id string) ([]string, error) {
        image, ok := r.lookup(id)
        if !ok {
-               return nil, ErrImageUnknown
+               return nil, errors.Wrapf(ErrImageUnknown, "error locating image 
with ID %q", id)
        }
        return copyStringSlice(image.BigDataNames), nil
 }
@@ -649,7 +649,7 @@
        }
        image, ok := r.lookup(id)
        if !ok {
-               return ErrImageUnknown
+               return errors.Wrapf(ErrImageUnknown, "error locating image with 
ID %q", id)
        }
        err := os.MkdirAll(r.datadir(image.ID), 0700)
        if err != nil {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/storage-1.13.2/images_ffjson.go 
new/storage-1.13.4/images_ffjson.go
--- old/storage-1.13.2/images_ffjson.go 2019-08-09 20:42:40.000000000 +0200
+++ new/storage-1.13.4/images_ffjson.go 2019-09-30 11:01:22.000000000 +0200
@@ -1,5 +1,5 @@
 // Code generated by ffjson <https://github.com/pquerna/ffjson>. DO NOT EDIT.
-// source: images.go
+// source: ./images.go
 
 package storage
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/storage-1.13.2/layers.go new/storage-1.13.4/layers.go
--- old/storage-1.13.2/layers.go        2019-08-09 20:42:40.000000000 +0200
+++ new/storage-1.13.4/layers.go        2019-09-30 11:01:22.000000000 +0200
@@ -363,7 +363,7 @@
                        }
                        if cleanup, ok := layer.Flags[incompleteFlag]; ok {
                                if b, ok := cleanup.(bool); ok && b {
-                                       err = r.Delete(layer.ID)
+                                       err = r.deleteInternal(layer.ID)
                                        if err != nil {
                                                break
                                        }
@@ -372,7 +372,7 @@
                        }
                }
                if shouldSave {
-                       return r.Save()
+                       return r.saveLayers()
                }
        }
        return err
@@ -416,6 +416,16 @@
 }
 
 func (r *layerStore) Save() error {
+       r.mountsLockfile.Lock()
+       defer r.mountsLockfile.Unlock()
+       defer r.mountsLockfile.Touch()
+       if err := r.saveLayers(); err != nil {
+               return err
+       }
+       return r.saveMounts()
+}
+
+func (r *layerStore) saveLayers() error {
        if !r.IsReadWrite() {
                return errors.Wrapf(ErrStoreIsReadOnly, "not allowed to modify 
the layer store at %q", r.layerspath())
        }
@@ -431,13 +441,7 @@
                return err
        }
        defer r.Touch()
-       if err := ioutils.AtomicWriteFile(rpath, jldata, 0600); err != nil {
-               return err
-       }
-       r.mountsLockfile.Lock()
-       defer r.mountsLockfile.Unlock()
-       defer r.mountsLockfile.Touch()
-       return r.saveMounts()
+       return ioutils.AtomicWriteFile(rpath, jldata, 0600)
 }
 
 func (r *layerStore) saveMounts() error {
@@ -954,7 +958,7 @@
        return filepath.Join(r.layerdir, id+tarSplitSuffix)
 }
 
-func (r *layerStore) Delete(id string) error {
+func (r *layerStore) deleteInternal(id string) error {
        if !r.IsReadWrite() {
                return errors.Wrapf(ErrStoreIsReadOnly, "not allowed to delete 
layers at %q", r.layerspath())
        }
@@ -963,23 +967,7 @@
                return ErrLayerUnknown
        }
        id = layer.ID
-       // The layer may already have been explicitly unmounted, but if not, we
-       // should try to clean that up before we start deleting anything at the
-       // driver level.
-       mountCount, err := r.Mounted(id)
-       if err != nil {
-               return errors.Wrapf(err, "error checking if layer %q is still 
mounted", id)
-       }
-       for mountCount > 0 {
-               if _, err := r.Unmount(id, false); err != nil {
-                       return err
-               }
-               mountCount, err = r.Mounted(id)
-               if err != nil {
-                       return errors.Wrapf(err, "error checking if layer %q is 
still mounted", id)
-               }
-       }
-       err = r.driver.Remove(id)
+       err := r.driver.Remove(id)
        if err == nil {
                os.Remove(r.tspath(id))
                delete(r.byid, id)
@@ -1015,11 +1003,36 @@
                                label.ReleaseLabel(mountLabel)
                        }
                }
-               if err = r.Save(); err != nil {
+       }
+       return err
+}
+
+func (r *layerStore) Delete(id string) error {
+       layer, ok := r.lookup(id)
+       if !ok {
+               return ErrLayerUnknown
+       }
+       id = layer.ID
+       // The layer may already have been explicitly unmounted, but if not, we
+       // should try to clean that up before we start deleting anything at the
+       // driver level.
+       mountCount, err := r.Mounted(id)
+       if err != nil {
+               return errors.Wrapf(err, "error checking if layer %q is still 
mounted", id)
+       }
+       for mountCount > 0 {
+               if _, err := r.Unmount(id, false); err != nil {
                        return err
                }
+               mountCount, err = r.Mounted(id)
+               if err != nil {
+                       return errors.Wrapf(err, "error checking if layer %q is 
still mounted", id)
+               }
        }
-       return err
+       if err := r.deleteInternal(id); err != nil {
+               return err
+       }
+       return r.Save()
 }
 
 func (r *layerStore) Lookup(name string) (id string, err error) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/storage-1.13.2/pkg/tarlog/tarlogger.go 
new/storage-1.13.4/pkg/tarlog/tarlogger.go
--- old/storage-1.13.2/pkg/tarlog/tarlogger.go  2019-08-09 20:42:40.000000000 
+0200
+++ new/storage-1.13.4/pkg/tarlog/tarlogger.go  2019-09-30 11:01:22.000000000 
+0200
@@ -26,7 +26,6 @@
                closed:     false,
        }
        tr := tar.NewReader(reader)
-       tr.RawAccounting = true
        t.closeMutex.Lock()
        go func() {
                hdr, err := tr.Next()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/storage-1.13.2/store.go new/storage-1.13.4/store.go
--- old/storage-1.13.2/store.go 2019-08-09 20:42:40.000000000 +0200
+++ new/storage-1.13.4/store.go 2019-09-30 11:01:22.000000000 +0200
@@ -1202,7 +1202,7 @@
                        }
                }
                if cimage == nil {
-                       return nil, ErrImageUnknown
+                       return nil, errors.Wrapf(ErrImageUnknown, "error 
locating image with ID %q", id)
                }
                imageID = cimage.ID
 
@@ -1437,7 +1437,7 @@
                        return bigDataNames, err
                }
        }
-       return nil, ErrImageUnknown
+       return nil, errors.Wrapf(ErrImageUnknown, "error locating image with ID 
%q", id)
 }
 
 func (s *store) ImageBigDataSize(id, key string) (int64, error) {
@@ -1502,6 +1502,7 @@
        if err != nil {
                return nil, err
        }
+       foundImage := false
        for _, s := range append([]ROImageStore{istore}, istores...) {
                store := s
                store.RLock()
@@ -1515,8 +1516,14 @@
                if err == nil {
                        return data, nil
                }
+               if store.Exists(id) {
+                       foundImage = true
+               }
        }
-       return nil, ErrImageUnknown
+       if foundImage {
+               return nil, errors.Wrapf(os.ErrNotExist, "error locating item 
named %q for image with ID %q", key, id)
+       }
+       return nil, errors.Wrapf(ErrImageUnknown, "error locating image with ID 
%q", id)
 }
 
 func (s *store) SetImageBigData(id, key string, data []byte, digestManifest 
func([]byte) (digest.Digest, error)) error {
@@ -1587,10 +1594,12 @@
                return -1, errors.Wrapf(ErrImageUnknown, "error locating image 
with ID %q", id)
        }
 
-       // Start with a list of the image's top layers.
+       // Start with a list of the image's top layers, if it has any.
        queue := make(map[string]struct{})
        for _, layerID := range append([]string{image.TopLayer}, 
image.MappedTopLayers...) {
-               queue[layerID] = struct{}{}
+               if layerID != "" {
+                       queue[layerID] = struct{}{}
+               }
        }
        visited := make(map[string]struct{})
        // Walk all of the layers.
@@ -2891,7 +2900,7 @@
                        return image, nil
                }
        }
-       return nil, ErrImageUnknown
+       return nil, errors.Wrapf(ErrImageUnknown, "error locating image with ID 
%q", id)
 }
 
 func (s *store) ImagesByTopLayer(id string) ([]*Image, error) {
@@ -2953,7 +2962,7 @@
                        }
                }
                imageList, err := store.ByDigest(d)
-               if err != nil && err != ErrImageUnknown {
+               if err != nil && errors.Cause(err) != ErrImageUnknown {
                        return nil, err
                }
                images = append(images, imageList...)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/storage-1.13.2/tests/bigdata.bats 
new/storage-1.13.4/tests/bigdata.bats
--- old/storage-1.13.2/tests/bigdata.bats       2019-08-09 20:42:40.000000000 
+0200
+++ new/storage-1.13.4/tests/bigdata.bats       2019-09-30 11:01:22.000000000 
+0200
@@ -53,6 +53,16 @@
        [ "$status" -eq 0 ]
        [ "$output" -eq 5678 ]
 
+       # Check that we can distinguish between no-such-image and no-such-item.
+       run storage --debug=false get-image-data nosuchimage big-item
+       [ "$status" -ne 0 ]
+       echo "$output"
+       [[ "$output" =~ "image not known" ]]
+       run storage --debug=false get-image-data $image no-such-big-item
+       [ "$status" -ne 0 ]
+       echo "$output"
+       [[ "$output" =~ "does not exist" ]]
+
        # Save the contents of the big data items to disk and compare them with 
the originals.
        run storage --debug=false get-image-data $image no-such-item
        [ "$status" -ne 0 ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/storage-1.13.2/tests/cleanup-layer.bats 
new/storage-1.13.4/tests/cleanup-layer.bats
--- old/storage-1.13.2/tests/cleanup-layer.bats 1970-01-01 01:00:00.000000000 
+0100
+++ new/storage-1.13.4/tests/cleanup-layer.bats 2019-09-30 11:01:22.000000000 
+0200
@@ -0,0 +1,17 @@
+#!/usr/bin/env bats
+
+load helpers
+
+@test "cleanup-layer" {
+       # Create a layer.
+       run storage --debug=false create-layer
+       [ "$status" -eq 0 ]
+       [ "$output" != "" ]
+       sed -i -e 's/"id":/"flags":{"incomplete":true},"id":/g' 
${TESTDIR}/root/${STORAGE_DRIVER}-layers/layers.json
+
+       # Get a list of the layers, which should clean it up.
+       run storage --debug=false layers
+       [ "$status" -eq 0 ]
+       echo "$output"
+       [ "${#lines[*]}" -eq 0 ]
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/storage-1.13.2/tests/image.bats 
new/storage-1.13.4/tests/image.bats
--- old/storage-1.13.2/tests/image.bats 2019-08-09 20:42:40.000000000 +0200
+++ new/storage-1.13.4/tests/image.bats 2019-09-30 11:01:22.000000000 +0200
@@ -28,3 +28,29 @@
        [[ "$output" =~ "Data: random1" ]]
        [[ "$output" =~ "Data: random2" ]]
 }
+
+@test "layerless-image" {
+       # Add an image with no specified layers.
+       name=wonderful-image
+       run storage --debug=false create-image --name $name
+       [ "$status" -eq 0 ]
+       [ "$output" != "" ]
+       image=${lines[0]}
+
+       # Add a couple of big data items.
+       createrandom ${TESTDIR}/random1
+       createrandom ${TESTDIR}/random2
+       storage set-image-data -f ${TESTDIR}/random1 $image random1
+       storage set-image-data -f ${TESTDIR}/random2 $image random2
+
+       # Get information about the image, and make sure the ID, name, and data 
names were preserved,
+       # and that we can properly report its disk usage.
+       run storage image $image
+       echo "$output"
+       [ "$status" -eq 0 ]
+       [[ "$output" =~ "ID: $image" ]]
+       [[ "$output" =~ "Name: $name" ]]
+       [[ "$output" =~ "Data: random1" ]]
+       [[ "$output" =~ "Data: random2" ]]
+       [[ "$output" =~ "Size: 512" ]]
+}


Reply via email to