status: Erase the current line upon new builds or downloads.

* guix/status.scm (print-build-event): Add 'erase-current-line*' call
upon 'build-started, 'substituter-started, 'download-started.
This commit is contained in:
Ludovic Courtès 2019-02-11 22:47:06 +01:00
parent 6701edbfad
commit 5ea206a8a9
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 3 additions and 0 deletions

View File

@ -506,6 +506,7 @@ addition to build events."
(match event (match event
(('build-started drv . _) (('build-started drv . _)
(erase-current-line*)
(let ((properties (derivation-properties (let ((properties (derivation-properties
(read-derivation-from-file drv)))) (read-derivation-from-file drv))))
(match (assq-ref properties 'type) (match (assq-ref properties 'type)
@ -552,10 +553,12 @@ addition to build events."
(format port (info (G_ "View build log at '~a'.")) log))) (format port (info (G_ "View build log at '~a'.")) log)))
(newline port)) (newline port))
(('substituter-started item _ ...) (('substituter-started item _ ...)
(erase-current-line*)
(when (or print-log? (not (extended-build-trace-supported?))) (when (or print-log? (not (extended-build-trace-supported?)))
(format port (info (G_ "substituting ~a...")) item) (format port (info (G_ "substituting ~a...")) item)
(newline port))) (newline port)))
(('download-started item uri _ ...) (('download-started item uri _ ...)
(erase-current-line*)
(format port (info (G_ "downloading from ~a...")) uri) (format port (info (G_ "downloading from ~a...")) uri)
(newline port)) (newline port))
(('download-progress item uri (('download-progress item uri