aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2018-09-11 22:16:24 +0200
committerRicardo Wurmus <rekado@elephly.net>2018-09-11 23:19:42 +0200
commitf72e5f93b7ba874ecc66ba419f71f384d1b7903d (patch)
tree6330dfef320a705e380345b7ad13485f2e7f6b34
parent4a67079f71c264950aa7c43c5fdaa7611298a3c4 (diff)
downloadguix-f72e5f93b7ba874ecc66ba419f71f384d1b7903d.tar
guix-f72e5f93b7ba874ecc66ba419f71f384d1b7903d.tar.gz
ui: Do not filter hash mismatch lines.
Reported by Pjotr Prins <pjotr.public12@thebird.nl>. * guix/ui.scm (build-output-port): Add pattern for hash mismatch error; be more careful with error messages in verbose mode.
-rw-r--r--guix/ui.scm26
1 files changed, 20 insertions, 6 deletions
diff --git a/guix/ui.scm b/guix/ui.scm
index 1bbd37c255..c55ae7e2f8 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)