summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorVincent Legoll <vincent.legoll@idgrilles.fr>2016-07-16 10:05:48 +0200
committerLudovic Courtès <ludo@gnu.org>2016-07-16 14:41:39 +0200
commit1187a27112be10f2ff74144f50c88714ccf30301 (patch)
tree86516a7d8122dffd73debbba62e7e96e91df1f62 /guix
parentfb8a5d633abad0f39027a9d3840cecbf9b4ec521 (diff)
guix gc: Display of saved space for garbage collection.
Fixes <http://bugs.gnu.org/23979>. * guix/scripts/gc.scm (guix-gc): Display freed bytes. Signed-off-by: Vincent Legoll <vincent.legoll@idgrilles.fr> Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'guix')
-rw-r--r--guix/scripts/gc.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/guix/scripts/gc.scm b/guix/scripts/gc.scm
index 8db28138c8..bdfee4308c 100644
--- a/guix/scripts/gc.scm
+++ b/guix/scripts/gc.scm
@@ -24,6 +24,7 @@
#:use-module (ice-9 match)
#:use-module (ice-9 regex)
#:use-module (srfi srfi-1)
+ #:use-module (srfi srfi-11)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-37)
#:export (guix-gc))
@@ -221,9 +222,11 @@ Invoke the garbage collector.\n"))
(free-space
(ensure-free-space store free-space))
(min-freed
- (collect-garbage store min-freed))
+ (let-values (((paths freed) (collect-garbage store min-freed)))
+ (info (_ "freed ~h bytes~%") freed)))
(else
- (collect-garbage store)))))
+ (let-values (((paths freed) (collect-garbage store)))
+ (info (_ "freed ~h bytes~%") freed))))))
((delete)
(delete-paths store (map direct-store-path paths)))
((list-references)