From 64afc72962a486153f2198812bfb2822e8916aa8 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 22 Apr 2021 22:58:03 +0200 Subject: status: Separate downloads upon '--verbosity=2'. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 362ae2882c..5820509b4c 100644 --- a/guix/status.scm +++ b/guix/status.scm @@ -552,12 +552,16 @@ (define erase-current-line* (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)) -- cgit v1.2.3