Subject: Re: bug#23979: [ER] guix gc should tell how much space it recovered

From: [email-masked] (Ludovic Courtès)
Date: Fri, 15 Jul 2016 16:33:46 +0200

Vincent Legoll <[email-masked]> skribis:

> It already shows:
> note: currently hard linking saves 485.41 MiB
>
> Recovered disk space would nicely complement that.

Indeed.

> Looks like I helped myself out of step 1:
> this is in guix/scripts/gc.scm if I'm not mistaken

Yep, you’re on the right track!

This code calls the ‘collect-garbage’ procedure, defined in (guix
store).  You’ll see that this procedure returns two values, which are
currently ignored: the name of the items that were removed from the
store, and the number of bytes freed.

Your mission, if you accept it, is to change gc.scm to retrieve this
second value and to display it in a human-friendly way.  :-)

HTH!

Ludo’.