aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2017-05-15 09:05:48 -0700
committerLudovic Courtès <ludo@gnu.org>2017-05-20 10:15:47 +0200
commit6d1ae43dcb9c754e14723e41ed10298ff100e5a4 (patch)
treecb2a0cdd505fa93c697a672bc39963082af37d04
parentd03b34cf190b5790ee1884ae551634f5f736f4f1 (diff)
downloadguix-6d1ae43dcb9c754e14723e41ed10298ff100e5a4.tar
guix-6d1ae43dcb9c754e14723e41ed10298ff100e5a4.tar.gz
profiles: Add elapsed time to manual-database hook to output message.
* guix/profiles.scm (manual-database): Add elapsed time to manual-database hook to output message. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--guix/profiles.scm18
1 files changed, 13 insertions, 5 deletions
diff --git a/guix/profiles.scm b/guix/profiles.scm
index eb172ef450..6733f105e3 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -957,6 +957,7 @@ the entries in MANIFEST."
#~(begin
(use-modules (guix build utils)
(srfi srfi-1)
+ (srfi srfi-19)
(srfi srfi-26))
(define entries
@@ -1011,16 +1012,23 @@ the entries in MANIFEST."
(mkdir-p man-directory)
(setenv "MANPATH" (string-join entries ":"))
- (format #t "creating manual page database for ~a packages...~%"
+ (format #t "Creating manual page database for ~a packages... "
(length entries))
(force-output)
-
- (zero? (system* #+(file-append man-db "/bin/mandb")
- "--quiet" "--create"
- "-C" "man_db.conf"))))
+ (let* ((start-time (current-time))
+ (exit-status (system* #+(file-append man-db "/bin/mandb")
+ "--quiet" "--create"
+ "-C" "man_db.conf"))
+ (duration (time-difference (current-time) start-time)))
+ (format #t "done in ~,3f s~%"
+ (+ (time-second duration)
+ (* (time-nanosecond duration) (expt 10 -9))))
+ (force-output)
+ (zero? exit-status))))
(gexp->derivation "manual-database" build
#:modules '((guix build utils)
+ (srfi srfi-19)
(srfi srfi-26))
#:local-build? #t))