[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/07: status: Use bold more sparsely at -v1.
From: |
guix-commits |
Subject: |
04/07: status: Use bold more sparsely at -v1. |
Date: |
Wed, 16 Feb 2022 10:55:41 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 086813f63ced22d8c10d2cd5d0aad717c02b30a4
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Feb 10 22:59:04 2022 +0100
status: Use bold more sparsely at -v1.
Until now, at -v1, all the "apply N grafts" messages (for instance)
would be displayed in bold. This would typically result in several
subsequent lines all bold, although none of them is particularly
interesting. This improves on that by avoiding bold at -v1 for these
messages.
* guix/status.scm (print-build-event)[emph]: New variable.
Use it for the "View build log", "expected hash", and "offloading build"
messages.
[info]: Default to 'identity' when PRINT-URLS? and PRINT-LOG? are both
false.
---
guix/status.scm | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/guix/status.scm b/guix/status.scm
index 868f6d6296..5b903372f1 100644
--- a/guix/status.scm
+++ b/guix/status.scm
@@ -414,6 +414,11 @@ produce colorful output. When PRINT-LOG? is true, display
the build log in
addition to build events. When PRINT-URLS? is true, display the URL of
substitutes being downloaded."
(define info
+ (if (and colorize? (or print-urls? print-log?))
+ (cute colorize-string <> (color BOLD))
+ identity))
+
+ (define emph
(if colorize?
(cute colorize-string <> (color BOLD))
identity))
@@ -526,7 +531,7 @@ substitutes being downloaded."
(format port (failure (G_ "Could not find build log for '~a'."))
drv))
(log
- (format port (info (G_ "View build log at '~a'.")) log)))
+ (format port (emph (G_ "View build log at '~a'.")) log)))
(newline port))
(('substituter-started item _ ...)
(erase-current-line*)
@@ -577,12 +582,12 @@ substitutes being downloaded."
;; /gnu/store/…-sth:", where "sha256" is the hash algorithm.
(format port (failure (G_ "~a hash mismatch for ~a:")) algo item)
(newline port)
- (format port (info (G_ "\
+ (format port (emph (G_ "\
expected hash: ~a
actual hash: ~a~%"))
expected actual))
(('build-remote drv host _ ...)
- (format port (info (G_ "offloading build of ~a to '~a'")) drv host)
+ (format port (emph (G_ "offloading build of ~a to '~a'")) drv host)
(newline port))
(('build-log pid line)
(if (multiplexed-output-supported?)
- branch master updated (176354c2f8 -> 6481dbda51), guix-commits, 2022/02/16
- 01/07: gexp: Preserve source location for #~ and #$ read extensions., guix-commits, 2022/02/16
- 04/07: status: Use bold more sparsely at -v1.,
guix-commits <=
- 07/07: gnu: c-vise: Fix linkage., guix-commits, 2022/02/16
- 03/07: status: Do not print .drv file names for grafts., guix-commits, 2022/02/16
- 02/07: doc: Document 'wrap-program' and 'wrap-script'., guix-commits, 2022/02/16
- 05/07: status: Do not pass a non-literal format string to 'format'., guix-commits, 2022/02/16
- 06/07: gnu: clang: Build and link as shared libraries., guix-commits, 2022/02/16