diff options
author | Ludovic Courtès <ludo@gnu.org> | 2021-04-22 22:58:03 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-04-23 00:32:30 +0200 |
commit | 64afc72962a486153f2198812bfb2822e8916aa8 (patch) | |
tree | 4c2b0ed8ad64553d74b3955b652cf313875d8680 | |
parent | 09ce4568f2cc1f87c5a5e0aa1643780c39a73088 (diff) | |
download | guix-64afc72962a486153f2198812bfb2822e8916aa8.tar guix-64afc72962a486153f2198812bfb2822e8916aa8.tar.gz |
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.
-rw-r--r-- | guix/status.scm | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/guix/status.scm b/guix/status.scm index 362ae2882c..5820509b4c 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)) |