all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 53933@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>
Subject: [bug#53933] [PATCH 2/3] status: Use bold more sparsely at -v1.
Date: Thu, 10 Feb 2022 23:16:52 +0100	[thread overview]
Message-ID: <20220210221653.22208-2-ludo@gnu.org> (raw)
In-Reply-To: <20220210221653.22208-1-ludo@gnu.org>

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 @@ (define* (print-build-event event old-status status
 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 @@ (define erase-current-line*
         (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 @@ (define erase-current-line*
      ;; /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?)
-- 
2.34.0





  reply	other threads:[~2022-02-10 22:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-10 22:08 [bug#53933] [PATCH 0/3] Tweak build output coming from (guix status) Ludovic Courtès
2022-02-10 22:16 ` [bug#53933] [PATCH 1/3] status: Do not print .drv file names for grafts Ludovic Courtès
2022-02-10 22:16   ` Ludovic Courtès [this message]
2022-02-10 22:16   ` [bug#53933] [PATCH 3/3] status: Do not pass a non-literal format string to 'format' Ludovic Courtès
2022-02-16 16:02 ` bug#53933: [PATCH 0/3] Tweak build output coming from (guix status) Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220210221653.22208-2-ludo@gnu.org \
    --to=ludo@gnu.org \
    --cc=53933@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.