[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/06: self: Produce progress reports compatible with (guix status).
From: |
guix-commits |
Subject: |
05/06: self: Produce progress reports compatible with (guix status). |
Date: |
Tue, 29 Jan 2019 06:10:01 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 35dcaa119e2b24343e76aa2a4213a3cc1fb69049
Author: Ludovic Courtès <address@hidden>
Date: Sun Jan 27 18:15:05 2019 +0100
self: Produce progress reports compatible with (guix status).
* guix/self.scm (compiled-modules)[build](report-load)
(report-compilation): Write "[M/N]" progress reports.
Use line-buffering.
---
guix/self.scm | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/guix/self.scm b/guix/self.scm
index d1b8256..f028bdb 100644
--- a/guix/self.scm
+++ b/guix/self.scm
@@ -856,13 +856,23 @@ containing MODULE-FILES and possibly other files as well."
(define (report-load file total completed)
(display #\cr)
(format #t
- "loading...\t~5,1f% of ~d files" ;FIXME: i18n
+ "address@hidden/address@hidden loading...\t~5,1f% of ~d
files"
+
+ ;; Note: Multiply TOTAL by two to account for the
+ ;; compilation phase that follows.
+ completed (* total 2)
+
(* 100. (/ completed total)) total)
(force-output))
(define (report-compilation file total completed)
(display #\cr)
- (format #t "compiling...\t~5,1f% of ~d files" ;FIXME: i18n
+ (format #t "address@hidden/address@hidden compiling...\t~5,1f% of
~d files"
+
+ ;; Add TOTAL to account for the load phase that came
+ ;; before.
+ (+ total completed) (* total 2)
+
(* 100. (/ completed total)) total)
(force-output))
@@ -874,8 +884,8 @@ containing MODULE-FILES and possibly other files as well."
#:report-load report-load
#:report-compilation report-compilation)))
- (setvbuf (current-output-port) 'none)
- (setvbuf (current-error-port) 'none)
+ (setvbuf (current-output-port) 'line)
+ (setvbuf (current-error-port) 'line)
(set! %load-path (cons #+module-tree %load-path))
(set! %load-path
- branch master updated (9e532ae -> 2790b66), guix-commits, 2019/01/29
- 01/06: channels: Do not offload package cache derivation., guix-commits, 2019/01/29
- 05/06: self: Produce progress reports compatible with (guix status).,
guix-commits <=
- 06/06: pull: Default to verbosity level 1., guix-commits, 2019/01/29
- 02/06: status: Record more information about builds., guix-commits, 2019/01/29
- 04/06: status: Print a progress bar for on-going builds when possible., guix-commits, 2019/01/29
- 03/06: status: Keep track of build completion as reported by build tools., guix-commits, 2019/01/29