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>master
parent
16dcac5b26
commit
516bfed7a3
|
@ -957,6 +957,7 @@ the entries in MANIFEST."
|
||||||
#~(begin
|
#~(begin
|
||||||
(use-modules (guix build utils)
|
(use-modules (guix build utils)
|
||||||
(srfi srfi-1)
|
(srfi srfi-1)
|
||||||
|
(srfi srfi-19)
|
||||||
(srfi srfi-26))
|
(srfi srfi-26))
|
||||||
|
|
||||||
(define entries
|
(define entries
|
||||||
|
@ -1011,16 +1012,23 @@ the entries in MANIFEST."
|
||||||
(mkdir-p man-directory)
|
(mkdir-p man-directory)
|
||||||
(setenv "MANPATH" (string-join entries ":"))
|
(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))
|
(length entries))
|
||||||
(force-output)
|
(force-output)
|
||||||
|
(let* ((start-time (current-time))
|
||||||
(zero? (system* #+(file-append man-db "/bin/mandb")
|
(exit-status (system* #+(file-append man-db "/bin/mandb")
|
||||||
"--quiet" "--create"
|
"--quiet" "--create"
|
||||||
"-C" "man_db.conf"))))
|
"-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
|
(gexp->derivation "manual-database" build
|
||||||
#:modules '((guix build utils)
|
#:modules '((guix build utils)
|
||||||
|
(srfi srfi-19)
|
||||||
(srfi srfi-26))
|
(srfi srfi-26))
|
||||||
#:local-build? #t))
|
#:local-build? #t))
|
||||||
|
|
||||||
|
|
Reference in New Issue