-- For reference, the last bit of conversation which occured on guix-devel regarding this was: myglc2 writes: [...] > Hi Maxim and Ludo’, > > I hacked profiles.scm (please see git diff below) so that start and end > seconds appear in the message like this: > > creating manual page database for 23 packages...1494773268...1494773275 DONE > > I tested a few cases and man-db typically takes only a few seconds. It > only _appears_ to take a long time because other processing occurs after > the man-db command. > > So, I suggest either ... > > 1) delete the message altogether, or > 2) close the message with a "DONE" > > SORRY for the run-around. In my defense, when I first raised the > question I did suggest the idea of closing the message: > No need to be sorry; improvements/ideas are always welcome! :) > http://lists.gnu.org/archive/html/guix-devel/2017-04/msg00196.html > > HTH, George > > g1@g1 ~/src/guix [env]$ git diff > diff --git a/guix/profiles.scm b/guix/profiles.scm > index eb172ef45..4dbf44a81 100644 > --- a/guix/profiles.scm > +++ b/guix/profiles.scm > @@ -1011,13 +1011,15 @@ the entries in MANIFEST." > (mkdir-p man-directory) > (setenv "MANPATH" (string-join entries ":")) > > - (format #t "creating manual page database for ~a packages...~%" > - (length entries)) > + (format #t "creating manual page database for ~a packages...~a" > + (length entries)(current-time)) > (force-output) > > (zero? (system* #+(file-append man-db "/bin/mandb") > "--quiet" "--create" > - "-C" "man_db.conf")))) > + "-C" "man_db.conf")) > + (format #t "...~a DONE~%" (current-time)) > + (force-output))) > > (gexp->derivation "manual-database" build > #:modules '((guix build utils) > g1@g1 ~/src/guix [env]$ I'd suggest leaving closing the message on the same line, maybe with something like: --8<---------------cut here---------------end--------------->8--- 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)) --8<---------------cut here---------------end--------------->8---