guix-patches
[Top][All Lists]
Advanced

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

[bug#33519] [PATCH 3/4] status: Report grafting derivations specially.


From: Ludovic Courtès
Subject: [bug#33519] [PATCH 3/4] status: Report grafting derivations specially.
Date: Mon, 26 Nov 2018 22:47:08 +0100

* guix/status.scm (print-build-event): In 'build-started' event handler,
check the properties of DRV and handle 'graft' derivations specially.
---
 guix/status.scm | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/guix/status.scm b/guix/status.scm
index 2ceb56788a..868bfdca21 100644
--- a/guix/status.scm
+++ b/guix/status.scm
@@ -325,7 +325,19 @@ addition to build events."
     (display "\r" port))                          ;erase the spinner
   (match event
     (('build-started drv . _)
-     (format port (info (G_ "building ~a...")) drv)
+     (let ((properties (derivation-properties
+                        (read-derivation-from-file drv))))
+       (match (assq-ref properties 'type)
+         ('graft
+           (let ((count (match (assq-ref properties 'graft)
+                          (#f  0)
+                          (lst (or (assq-ref lst 'count) 0)))))
+             (format port (info (N_ "applying ~a graft for ~a..."
+                                    "applying ~a grafts for ~a..."
+                                    count))
+                     count drv)))
+         (_
+          (format port (info (G_ "building ~a...")) drv))))
      (newline port))
     (('build-succeeded drv . _)
      (when (or print-log? (not (extended-build-trace-supported?)))
-- 
2.19.1






reply via email to

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