* [bug#42208] [PATCH 0/1] weather: Print 0.0% correctly.
@ 2020-07-04 23:05 Arun Isaac
2020-07-04 23:07 ` [bug#42208] [PATCH] " Arun Isaac
2020-07-05 7:54 ` [bug#42208] [PATCH 0/1] " Mathieu Othacehe
0 siblings, 2 replies; 4+ messages in thread
From: Arun Isaac @ 2020-07-04 23:05 UTC (permalink / raw)
To: 42208; +Cc: Arun Isaac
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#42208] [PATCH] weather: Print 0.0% correctly.
2020-07-04 23:05 [bug#42208] [PATCH 0/1] weather: Print 0.0% correctly Arun Isaac
@ 2020-07-04 23:07 ` Arun Isaac
2020-07-05 7:54 ` [bug#42208] [PATCH 0/1] " Mathieu Othacehe
1 sibling, 0 replies; 4+ messages in thread
From: Arun Isaac @ 2020-07-04 23:07 UTC (permalink / raw)
To: 42208; +Cc: Arun Isaac
* 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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#42208] [PATCH 0/1] weather: Print 0.0% correctly.
2020-07-04 23:05 [bug#42208] [PATCH 0/1] weather: Print 0.0% correctly Arun Isaac
2020-07-04 23:07 ` [bug#42208] [PATCH] " Arun Isaac
@ 2020-07-05 7:54 ` Mathieu Othacehe
2020-07-05 10:46 ` bug#42208: " Arun Isaac
1 sibling, 1 reply; 4+ messages in thread
From: Mathieu Othacehe @ 2020-07-05 7:54 UTC (permalink / raw)
To: Arun Isaac; +Cc: 42208
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#42208: [PATCH 0/1] weather: Print 0.0% correctly.
2020-07-05 7:54 ` [bug#42208] [PATCH 0/1] " Mathieu Othacehe
@ 2020-07-05 10:46 ` Arun Isaac
0 siblings, 0 replies; 4+ messages in thread
From: Arun Isaac @ 2020-07-05 10:46 UTC (permalink / raw)
To: Mathieu Othacehe; +Cc: 42208-done
[-- Attachment #1: Type: text/plain, Size: 27 bytes --]
Pushed to master, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-07-05 10:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-04 23:05 [bug#42208] [PATCH 0/1] weather: Print 0.0% correctly Arun Isaac
2020-07-04 23:07 ` [bug#42208] [PATCH] " Arun Isaac
2020-07-05 7:54 ` [bug#42208] [PATCH 0/1] " Mathieu Othacehe
2020-07-05 10:46 ` bug#42208: " Arun Isaac
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.