guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: ui: Do not filter hash mismatch lines.


From: Ricardo Wurmus
Subject: 01/02: ui: Do not filter hash mismatch lines.
Date: Tue, 11 Sep 2018 17:21:04 -0400 (EDT)

rekado pushed a commit to branch master
in repository guix.

commit f72e5f93b7ba874ecc66ba419f71f384d1b7903d
Author: Ricardo Wurmus <address@hidden>
Date:   Tue Sep 11 22:16:24 2018 +0200

    ui: Do not filter hash mismatch lines.
    
    Reported by Pjotr Prins <address@hidden>.
    
    * guix/ui.scm (build-output-port): Add pattern for hash mismatch error; be
    more careful with error messages in verbose mode.
---
 guix/ui.scm | 26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)

diff --git a/guix/ui.scm b/guix/ui.scm
index 1bbd37c..c55ae7e 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -1708,12 +1708,26 @@ phase announcements and replaces any other output with 
a spinner."
                         (string-append
                          (proc "Building " 'BLUE 'BOLD)
                          (match:substring m 2) "\n")))
-                    ("^(@ build-failed) (.*) (.*)"
-                     #:transform
-                     ,(lambda (m)
-                        (string-append
-                         (proc "Build failed: " 'RED 'BOLD)
-                         (match:substring m 2) "\n")))
+                    ,(if verbose?
+                         ;; Err on the side of caution: show everything, even
+                         ;; if it might be redundant.
+                         `("^(@ build-failed)(.+)"
+                           #:transform
+                           ,(lambda (m)
+                              (string-append
+                               (proc "Build failed: " 'RED 'BOLD)
+                               (match:substring m 2))))
+                         ;; Show only that the build failed.
+                         `("^(@ build-failed)(.+) -.*"
+                           #:transform
+                           ,(lambda (m)
+                              (string-append
+                               (proc "Build failed: " 'RED 'BOLD)
+                               (match:substring m 2)
+                               "\n"))))
+                    ;; NOTE: this line contains "\n" characters.
+                    ("^(sha256 hash mismatch for output path)(.*)"
+                     RED BLACK)
                     ("^(@ build-succeeded) (.*) (.*)"
                      #:transform
                      ,(lambda (m)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]