From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vincent Legoll Subject: [PATCH] Display of saved space for garbage collection Date: Sat, 16 Jul 2016 10:05:48 +0200 Message-ID: <1468656348-27813-1-git-send-email-vincent.legoll@gmail.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bOKbv-00067V-47 for guix-devel@gnu.org; Sat, 16 Jul 2016 04:06:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bOKbr-0005vJ-5I for guix-devel@gnu.org; Sat, 16 Jul 2016 04:06:06 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:36446) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bOKbq-0005vD-Tz for guix-devel@gnu.org; Sat, 16 Jul 2016 04:06:03 -0400 Received: by mail-wm0-x243.google.com with SMTP id x83so4969778wma.3 for ; Sat, 16 Jul 2016 01:06:02 -0700 (PDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org Cc: Vincent Legoll From: Vincent Legoll * guix/scripts/gc.scm: Add display of freed bytes for "guix gc" Fixes . Signed-off-by: Vincent Legoll --- guix/scripts/gc.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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) -- 1.9.1