[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/04: status: Separate downloads upon '--verbosity=2'.
From: |
guix-commits |
Subject: |
04/04: status: Separate downloads upon '--verbosity=2'. |
Date: |
Thu, 22 Apr 2021 18:39:02 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 64afc72962a486153f2198812bfb2822e8916aa8
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Apr 22 22:58:03 2021 +0200
status: Separate downloads upon '--verbosity=2'.
This is a followup to 1fa4aff1fbb46bbb9df8486ca12bfcfe6144458a,
reintroducing the newline previously emitted by 'guix substitute' upon
download completion.
With this change, with '--verbosity=2', each download occupies three
lines again, like so:
--8<---------------cut here---------------start------------->8---
downloading from https://ci.guix.gnu.org/nar/lzip/…-jsoncpp-1.9.2 ...
jsoncpp-1.9.2 93KiB 4.2MiB/s 00:00 [##################]
100.0%
--8<---------------cut here---------------end--------------->8---
This makes the output more readable.
* guix/status.scm (print-build-event): When PRINT-URLS? is true, print
a blank line after the download.
---
guix/status.scm | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/guix/status.scm b/guix/status.scm
index 362ae28..5820509 100644
--- a/guix/status.scm
+++ b/guix/status.scm
@@ -552,12 +552,16 @@ substitutes being downloaded."
(download-start download)
#:transferred transferred))))))
(('substituter-succeeded item _ ...)
- ;; If there are no jobs running, we already reported download completion
- ;; so there's nothing left to do.
- (unless (and (zero? (simultaneous-jobs status))
- (extended-build-trace-supported?))
- (format port (success (G_ "substitution of ~a complete")) item)
- (newline port)))
+ (when (extended-build-trace-supported?)
+ ;; If there are no jobs running, we already reported download completion
+ ;; so there's nothing left to do.
+ (unless (zero? (simultaneous-jobs status))
+ (format port (success (G_ "substitution of ~a complete")) item))
+
+ (when (and print-urls? (zero? (simultaneous-jobs status)))
+ ;; Leave a blank line after the "downloading ..." line and the
+ ;; progress bar (that's three lines in total).
+ (newline port))))
(('substituter-failed item _ ...)
(format port (failure (G_ "substitution of ~a failed")) item)
(newline port))