diff mbox

Display of saved space for garbage collection

Message ID 1468656348-27813-1-git-send-email-vincent.legoll@gmail.com
State Committed
Headers show

Commit Message

Vincent Legoll July 16, 2016, 8:05 a.m. UTC
From: Vincent Legoll <vincent.legoll@idgrilles.fr>

* guix/scripts/gc.scm: Add display of freed bytes for "guix gc"

Fixes <http://bugs.gnu.org/23979>.

Signed-off-by: Vincent Legoll <vincent.legoll@idgrilles.fr>
---
 guix/scripts/gc.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Ludovic Courtès July 16, 2016, 12:40 p.m. UTC | #1
Vincent Legoll <vincent.legoll@gmail.com> skribis:

> From: Vincent Legoll <vincent.legoll@idgrilles.fr>
>
> * guix/scripts/gc.scm: Add display of freed bytes for "guix gc"
>
> Fixes <http://bugs.gnu.org/23979>.

Perfect.  Applied, thanks!

Now make sure to email 23979-done@debbugs.gnu.org to close it.  :-)

Ludo’.
Vincent Legoll July 16, 2016, 12:56 p.m. UTC | #2
> Now make sure to email 23979-done@debbugs.gnu.org to close it.  :-)

Done, thanks
diff mbox

Patch

diff --git a/guix/scripts/gc.scm b/guix/scripts/gc.scm
index 8db2813..bdfee43 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)