Skip to content

Commit

Permalink
prune: always prune OSTree references
Browse files Browse the repository at this point in the history
4abc3eb changed this to be done only
when there are Docker images that are pruned as well.  Change it back to
the previous behavior.

Closes: projectatomic#496

Signed-off-by: Giuseppe Scrivano <[email protected]>

Closes: projectatomic#497
Approved by: jlebon
  • Loading branch information
giuseppe committed Jul 26, 2016
1 parent 3d18350 commit 79f8c78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Atomic/delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@ def prune_images(self):
"""
enc = sys.getdefaultencoding()

self.syscontainers.prune_ostree_images()

results = self.d.images(filters={"dangling":True}, quiet=True)
if len(results) == 0:
return 0

for img in results:
self.d.remove_image(img.decode(enc), force=True)
util.write_out("Removed dangling Image {}".format(enc))
self.syscontainers.prune_ostree_images()
return 0

def _delete_remote(self, targets):
Expand Down

0 comments on commit 79f8c78

Please sign in to comment.