diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-09-05 23:11:04 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-09-05 23:11:04 +0200 |
commit | b50c5b741891eabb16b83091d911c6ebd9b890d3 (patch) | |
tree | 9eb62522f1f81ba0f607e4044ecaaf8eb167eba1 /guix/scripts/pull.scm | |
parent | 6fd1a7967481037560d2ab25f31da182822ef889 (diff) | |
download | gnu-guix-b50c5b741891eabb16b83091d911c6ebd9b890d3.tar gnu-guix-b50c5b741891eabb16b83091d911c6ebd9b890d3.tar.gz |
pull: Add a compilation progress report.
* guix/build/pull.scm (report-build-progress): New procedure.
(p-for-each): Add #:progress parameter.
[loop]: Keep track of the number of completed processes. Tail-call
PROGRESS at each loop iteration.
(build-guix): Add #:debug-port parameter. Use it for verbose
messages. Change 'tar' flags to 'xf'. Around 'compile-file' call,
bind CURRENT-WARNING-PORT to DEBUG-PORT.
* guix/scripts/pull.scm (unpack): Add #:verbose? parameter.
[builder]: Pass #:debug-port to 'build-guix'.
(guix-pull): Leave CURRENT-BUILD-OUTPUT-PORT unchanged. Pass
#:verbose? to 'unpack'.
Diffstat (limited to 'guix/scripts/pull.scm')
-rw-r--r-- | guix/scripts/pull.scm | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index c2bf536e86..5dafb84f91 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -38,15 +38,21 @@ "http://git.savannah.gnu.org/cgit/guix.git/snapshot/guix-master.tar.gz" ) -(define (unpack store tarball) +(define* (unpack store tarball #:key verbose?) "Return a derivation that unpacks TARBALL into STORE and compiles Scheme files." (define builder - '(begin + `(begin (use-modules (guix build pull)) (build-guix (assoc-ref %outputs "out") (assoc-ref %build-inputs "tarball") + + ;; XXX: This is not perfect, enabling VERBOSE? means + ;; building a different derivation. + #:debug-port (if ',verbose? + (current-error-port) + (%make-void-port "w")) #:tar (assoc-ref %build-inputs "tar") #:gzip (assoc-ref %build-inputs "gzip") #:gcrypt (assoc-ref %build-inputs "gcrypt")))) @@ -129,13 +135,10 @@ Download and deploy the latest version of Guix.\n")) (package-derivation store (if (assoc-ref opts 'bootstrap?) %bootstrap-guile - (canonical-package guile-2.0)))) - (current-build-output-port - (if (assoc-ref opts 'verbose?) - (current-error-port) - (%make-void-port "w")))) + (canonical-package guile-2.0))))) (let* ((config-dir (config-directory)) - (source (unpack store tarball)) + (source (unpack store tarball + #:verbose? (assoc-ref opts 'verbose?))) (source-dir (derivation->output-path source))) (if (show-what-to-build store (list source)) (if (build-derivations store (list source)) |