diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-04-25 11:16:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-25 11:16:45 -0700 |
commit | e900e95f9aa6a22eeef9f78573dfb88df2f10d49 (patch) | |
tree | ea8137507f196ad7bdd3a080e4b4e769ce6ecae7 /libpod/image/prune.go | |
parent | 36f479097d6617bd4a078144a8709c19f865eb8f (diff) | |
parent | 4daac4736e3476211de7c1672bb5161191666a91 (diff) | |
download | podman-e900e95f9aa6a22eeef9f78573dfb88df2f10d49.tar.gz podman-e900e95f9aa6a22eeef9f78573dfb88df2f10d49.tar.bz2 podman-e900e95f9aa6a22eeef9f78573dfb88df2f10d49.zip |
Merge pull request #2990 from nalind/image-parent-child
image: rework parent/child/history matching
Diffstat (limited to 'libpod/image/prune.go')
-rw-r--r-- | libpod/image/prune.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libpod/image/prune.go b/libpod/image/prune.go index 5bd3c2c99..a4f8a0c9f 100644 --- a/libpod/image/prune.go +++ b/libpod/image/prune.go @@ -1,6 +1,8 @@ package image import ( + "context" + "github.com/containers/libpod/libpod/events" "github.com/pkg/errors" ) @@ -34,14 +36,14 @@ func (ir *Runtime) GetPruneImages(all bool) ([]*Image, error) { // PruneImages prunes dangling and optionally all unused images from the local // image store -func (ir *Runtime) PruneImages(all bool) ([]string, error) { +func (ir *Runtime) PruneImages(ctx context.Context, all bool) ([]string, error) { var prunedCids []string pruneImages, err := ir.GetPruneImages(all) if err != nil { return nil, errors.Wrap(err, "unable to get images to prune") } for _, p := range pruneImages { - if err := p.Remove(true); err != nil { + if err := p.Remove(ctx, true); err != nil { return nil, errors.Wrap(err, "failed to prune image") } defer p.newImageEvent(events.Prune) |