diff options
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/diff.go | 12 | ||||
-rw-r--r-- | libpod/image/prune.go | 5 |
2 files changed, 3 insertions, 14 deletions
diff --git a/libpod/diff.go b/libpod/diff.go index 36d60b838..df1acf4bb 100644 --- a/libpod/diff.go +++ b/libpod/diff.go @@ -1,8 +1,6 @@ package libpod import ( - "io" - "github.com/containers/podman/v3/libpod/layers" "github.com/containers/storage/pkg/archive" "github.com/pkg/errors" @@ -46,16 +44,6 @@ func (r *Runtime) GetDiff(from, to string) ([]archive.Change, error) { return rchanges, err } -// ApplyDiffTarStream applies the changes stored in 'diff' to the layer 'to' -func (r *Runtime) ApplyDiffTarStream(to string, diff io.Reader) error { - toLayer, err := r.getLayerID(to) - if err != nil { - return err - } - _, err = r.store.ApplyDiff(toLayer, diff) - return err -} - // GetLayerID gets a full layer id given a full or partial id // If the id matches a container or image, the id of the top layer is returned // If the id matches a layer, the top layer id is returned diff --git a/libpod/image/prune.go b/libpod/image/prune.go index 12727901a..0e41fde44 100644 --- a/libpod/image/prune.go +++ b/libpod/image/prune.go @@ -134,10 +134,11 @@ func (ir *Runtime) PruneImages(ctx context.Context, all bool, filter []string) ( } nameOrID := img.ID() s, err := img.Size(ctx) - imgSize := *s + imgSize := uint64(0) if err != nil { logrus.Warnf("Failed to collect image size for: %s, %s", nameOrID, err) - imgSize = 0 + } else { + imgSize = *s } if err := img.Remove(ctx, false); err != nil { if errors.Cause(err) == storage.ErrImageUsedByContainer { |