GNU bug report logs - #42208
[PATCH 0/1] weather: Print 0.0% correctly.

Previous Next

Package: guix-patches;

Reported by: Arun Isaac <arunisaac <at> systemreboot.net>

Date: Sat, 4 Jul 2020 23:06:02 UTC

Severity: normal

Tags: patch

Done: Arun Isaac <arunisaac <at> systemreboot.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42208 in the body.
You can then email your comments to 42208 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#42208; Package guix-patches. (Sat, 04 Jul 2020 23:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Arun Isaac <arunisaac <at> systemreboot.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 04 Jul 2020 23:06:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: guix-patches <at> gnu.org
Cc: Arun Isaac <arunisaac <at> systemreboot.net>
Subject: [PATCH 0/1] weather: Print 0.0% correctly.
Date: Sun,  5 Jul 2020 04:35:04 +0530
This is a bit of a nitpick. When there are no substitues, `guix weather`
reports it as ".0% substitutes available". It should instead report it as
"0.0% substitutes unavailable". I didn't know what the '2' specifying width in
~2,1f was for. Hence, I have removed it. Feel free to correct me if I did
something wrong.

Arun Isaac (1):
  weather: Print 0.0% correctly.

 guix/scripts/weather.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.26.2





Information forwarded to guix-patches <at> gnu.org:
bug#42208; Package guix-patches. (Sat, 04 Jul 2020 23:08:02 GMT) Full text and rfc822 format available.

Message #8 received at 42208 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: 42208 <at> debbugs.gnu.org
Cc: Arun Isaac <arunisaac <at> systemreboot.net>
Subject: [PATCH] weather: Print 0.0% correctly.
Date: Sun,  5 Jul 2020 04:37:47 +0530
* guix/scripts/weather.scm (report-server-coverage): Report 0% coverage as
0.0%, not as .0%.
---
 guix/scripts/weather.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/scripts/weather.scm b/guix/scripts/weather.scm
index 475d989357..3035ff6ca8 100644
--- a/guix/scripts/weather.scm
+++ b/guix/scripts/weather.scm
@@ -190,7 +190,7 @@ Return the coverage ratio, an exact number between 0 and 1."
                                  narinfos))
           (time      (+ (time-second time)
                         (/ (time-nanosecond time) 1e9))))
-      (format #t (G_ "  ~2,1f% substitutes available (~h out of ~h)~%")
+      (format #t (G_ "  ~,1f% substitutes available (~h out of ~h)~%")
               (* 100. (/ obtained requested 1.))
               obtained requested)
       (let ((total (/ (reduce + 0 sizes) MiB)))
-- 
2.26.2





Information forwarded to guix-patches <at> gnu.org:
bug#42208; Package guix-patches. (Sun, 05 Jul 2020 07:55:02 GMT) Full text and rfc822 format available.

Message #11 received at 42208 <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: 42208 <at> debbugs.gnu.org
Subject: Re: [bug#42208] [PATCH 0/1] weather: Print 0.0% correctly.
Date: Sun, 05 Jul 2020 09:54:26 +0200
Hello Arun,

> "0.0% substitutes unavailable". I didn't know what the '2' specifying width in
> ~2,1f was for. Hence, I have removed it. Feel free to correct me if I did
> something wrong.

This "2" is the width argument of the ~f parameter (see
https://www.gnu.org/software/guile/manual/html_node/Formatted-Output.html).

It's supposed to pad left with spaces if the output is less than "2"
characters. Anyway, the zero case is not handled properly as you
noticed, so this looks good to me.

Thanks,

Mathieu




Reply sent to Arun Isaac <arunisaac <at> systemreboot.net>:
You have taken responsibility. (Sun, 05 Jul 2020 10:47:02 GMT) Full text and rfc822 format available.

Notification sent to Arun Isaac <arunisaac <at> systemreboot.net>:
bug acknowledged by developer. (Sun, 05 Jul 2020 10:47:02 GMT) Full text and rfc822 format available.

Message #16 received at 42208-done <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 42208-done <at> debbugs.gnu.org
Subject: Re: [bug#42208] [PATCH 0/1] weather: Print 0.0% correctly.
Date: Sun, 05 Jul 2020 16:16:20 +0530
[Message part 1 (text/plain, inline)]
Pushed to master, thanks!
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 02 Aug 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 18 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.