aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2019-06-19 15:17:45 +0200
committerRicardo Wurmus <rekado@elephly.net>2019-06-19 15:17:45 +0200
commit5885b9814d0f53dbac7d1b22f392b86199c2d976 (patch)
treee7f89c435cf06f94bf1e3c05fa0cab0eb3a75584
parentefe7d36e64aae5f96fd2e75ceb841990e721f4af (diff)
downloadcuirass-5885b9814d0f53dbac7d1b22f392b86199c2d976.tar
cuirass-5885b9814d0f53dbac7d1b22f392b86199c2d976.tar.gz
templates: Display logs of blocking dependencies.
* src/cuirass/templates.scm (build-details): Determine failed outputs of prerequisites and link to their logs.
-rw-r--r--src/cuirass/templates.scm20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/cuirass/templates.scm b/src/cuirass/templates.scm
index 989cbf9..fb3c7e9 100644
--- a/src/cuirass/templates.scm
+++ b/src/cuirass/templates.scm
@@ -25,6 +25,8 @@
#:use-module (srfi srfi-2)
#:use-module (srfi srfi-19)
#:use-module (srfi srfi-26)
+ #:use-module (guix derivations)
+ #:use-module (guix store)
#:use-module ((cuirass database) #:select (build-status))
#:export (html-page
specifications-table
@@ -146,6 +148,17 @@
`(span (@ (class "oi oi-x text-danger")
(title "Failed"))
" Failed"))))
+ (define blocking-outputs
+ (or (and-let* (((= (build-status failed-dependency) status))
+ (drv (false-if-exception
+ (read-derivation-from-file
+ (assq-ref build #:derivation)))))
+ (append-map derivation-input-output-paths
+ (filter (compose derivation-log-file derivation-input-path)
+ (with-store store
+ (derivation-prerequisites-to-build
+ store drv #:substitutable-info (const #f))))))
+ '()))
(define completed?
(or (= (build-status succeeded) status)
(= (build-status failed) status)))
@@ -156,7 +169,12 @@
(tr (th "Build ID")
(td ,(assq-ref build #:id)))
(tr (th "Status")
- (td ,display-status))
+ (td ,display-status
+ ,@(map (lambda (output)
+ `((br)
+ (a (@ (href ,(string-append "/log/" (basename output))))
+ ,output)))
+ blocking-outputs)))
(tr (th "System")
(td ,(assq-ref build #:system)))
(tr (th "Name")