[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] scripts: gc: Report size in MiBs instead of bytes.
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH] scripts: gc: Report size in MiBs instead of bytes. |
Date: |
Wed, 27 Jun 2018 21:48:47 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Hello Taylan,
Taylan Kammer <address@hidden> skribis:
> I'm quite out of the loop and would appreciate if someone told me where
> to best push this if it's OK. :-)
Heh, good to see you back!
> From 4742df4c050fdcfd6caa76baa2c191f5adaa2a30 Mon Sep 17 00:00:00 2001
> From: Taylan Kammer <address@hidden>
> Date: Fri, 22 Jun 2018 21:55:26 +0200
> Subject: [PATCH] scripts: gc: Report size in MiBs instead of bytes.
>
> * guix/scripts/gc.scm (guix-gc): Show info in MiBs not bytes.
[...]
> + (info (G_ "already ~h MiBs available on ~a, nothing to do~%")
> + (/ free 1024 1024) (%store-prefix))
In all divisions, you should write “1024.” to have inexact numbers. It
turns out that currently ~h does that for you, but it’s safer to do it
upfront.
With this change you can push right to master!
In the future we should probably have a ‘number->size’ (the dual of
‘size->number’ in (guix ui)) that would take a byte count and return a
string denoting the size in a human-friendly way (as KiB, MiB, or GiB).
Thanks,
Ludo’.