unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Vincent Legoll <vincent.legoll@gmail.com>
To: guix-devel@gnu.org
Cc: Vincent Legoll <vincent.legoll@idgrilles.fr>
Subject: [PATCH] Display of saved space for garbage collection
Date: Sat, 16 Jul 2016 10:05:48 +0200	[thread overview]
Message-ID: <1468656348-27813-1-git-send-email-vincent.legoll@gmail.com> (raw)

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(-)

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

             reply	other threads:[~2016-07-16  8:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-16  8:05 Vincent Legoll [this message]
2016-07-16 12:40 ` [PATCH] Display of saved space for garbage collection Ludovic Courtès
2016-07-16 12:56   ` Vincent Legoll

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1468656348-27813-1-git-send-email-vincent.legoll@gmail.com \
    --to=vincent.legoll@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=vincent.legoll@idgrilles.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).