GNU bug report logs - #53933
[PATCH 0/3] Tweak build output coming from (guix status)

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Thu, 10 Feb 2022 22:09:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53933 in the body.
You can then email your comments to 53933 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#53933; Package guix-patches. (Thu, 10 Feb 2022 22:09:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ludovic Courtès <ludo <at> gnu.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 10 Feb 2022 22:09:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: guix-patches <at> gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 0/3] Tweak build output coming from (guix status)
Date: Thu, 10 Feb 2022 23:08:36 +0100
Hi!

Here are cosmetic changes to improve the way things get printed.

Feedback welcome!

Ludo’.

Ludovic Courtès (3):
  status: Do not print .drv file names for grafts.
  status: Use bold more sparsely at -v1.
  status: Do not pass a non-literal format string to 'format'.

 guix/status.scm | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)


base-commit: 0e103ec611acb25966bedc7ac9537b34f0a53306
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53933; Package guix-patches. (Thu, 10 Feb 2022 22:18:02 GMT) Full text and rfc822 format available.

Message #8 received at 53933 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: 53933 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 1/3] status: Do not print .drv file names for grafts.
Date: Thu, 10 Feb 2022 23:16:51 +0100
With this change, "guix build vim-full" prints:

  applying 15 grafts for vim-full-8.2.4306 ...

instead of showing /gnu/store/…-vim-full-8.2.4306.drv.

* guix/status.scm (print-build-event): In the 'graft' case, print just
the "package name" part of DRV.
---
 guix/status.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/guix/status.scm b/guix/status.scm
index fba28765df..868f6d6296 100644
--- a/guix/status.scm
+++ b/guix/status.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2017-2022 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado <at> elephly.net>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -483,7 +483,9 @@ (define erase-current-line*
              (format port (info (N_ "applying ~a graft for ~a ..."
                                     "applying ~a grafts for ~a ..."
                                     count))
-                     count drv)))
+                     count
+                     (string-drop-right (store-path-package-name drv)
+                                        (string-length ".drv")))))
          ('profile
           (let ((count (match (assq-ref properties 'profile)
                          (#f  0)
-- 
2.34.0





Information forwarded to guix-patches <at> gnu.org:
bug#53933; Package guix-patches. (Thu, 10 Feb 2022 22:18:02 GMT) Full text and rfc822 format available.

Message #11 received at 53933 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: 53933 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 2/3] status: Use bold more sparsely at -v1.
Date: Thu, 10 Feb 2022 23:16:52 +0100
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





Information forwarded to guix-patches <at> gnu.org:
bug#53933; Package guix-patches. (Thu, 10 Feb 2022 22:18:03 GMT) Full text and rfc822 format available.

Message #14 received at 53933 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: 53933 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 3/3] status: Do not pass a non-literal format string to
 'format'.
Date: Thu, 10 Feb 2022 23:16:53 +0100
* guix/status.scm (print-build-event): Use 'display' instead of 'format'
for hooks.
---
 guix/status.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/status.scm b/guix/status.scm
index 5b903372f1..b8905c9542 100644
--- a/guix/status.scm
+++ b/guix/status.scm
@@ -503,7 +503,7 @@ (define erase-current-line*
           (let ((hook-type (assq-ref properties 'hook)))
             (or (and=> (hook-message hook-type)
                        (lambda (msg)
-                         (format port (info msg))))
+                         (display (info msg) port)))
                 (format port (info (G_ "running profile hook of type '~a'..."))
                         hook-type))))
          (_
-- 
2.34.0





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Wed, 16 Feb 2022 16:03:01 GMT) Full text and rfc822 format available.

Notification sent to Ludovic Courtès <ludo <at> gnu.org>:
bug acknowledged by developer. (Wed, 16 Feb 2022 16:03:01 GMT) Full text and rfc822 format available.

Message #19 received at 53933-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: 53933-done <at> debbugs.gnu.org
Subject: Re: bug#53933: [PATCH 0/3] Tweak build output coming from (guix
 status)
Date: Wed, 16 Feb 2022 17:02:38 +0100
Ludovic Courtès <ludo <at> gnu.org> skribis:

>   status: Do not print .drv file names for grafts.
>   status: Use bold more sparsely at -v1.
>   status: Do not pass a non-literal format string to 'format'.

Pushed as 5d4d8d83e4aa6db2e0a325e2ffb915c12fe5234d.

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 17 Mar 2022 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 89 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.