diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2018-09-04 17:32:27 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2018-09-09 23:18:21 +0200 |
commit | 15cc7e6adfa503a1cf168d19a952fae02f91ab2d (patch) | |
tree | d02b0b8681aca627a3fc494fd253e5a6465da7a7 /guix/scripts | |
parent | 80ec1b73d2ca9745ea3b056bbfcecf3c33a4de5f (diff) | |
download | gnu-guix-15cc7e6adfa503a1cf168d19a952fae02f91ab2d.tar gnu-guix-15cc7e6adfa503a1cf168d19a952fae02f91ab2d.tar.gz |
ui: Add soft port for styling and filtering build output.
* guix/ui.scm (build-output-port): New procedure.
* guix/scripts/package.scm (%default-options): Print build trace.
(guix-package): Use build-output-port.
* guix/scripts/build.scm (guix-build): Use build-output-port.
Co-authored-by: Sahithi Yarlagadda <sahi@swecha.net>
Diffstat (limited to 'guix/scripts')
-rw-r--r-- | guix/scripts/build.scm | 2 | ||||
-rw-r--r-- | guix/scripts/package.scm | 39 |
2 files changed, 24 insertions, 17 deletions
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index 4dd4fbccdf..3fa3c2c20f 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -735,7 +735,7 @@ needed." (parameterize ((current-build-output-port (if quiet? (%make-void-port "w") - (current-error-port)))) + (build-output-port #:verbose? #t)))) (let* ((mode (assoc-ref opts 'build-mode)) (drv (options->derivations store opts)) (urls (map (cut string-append <> "/log") diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 97bcc699d9..73cbccba3b 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -329,7 +329,8 @@ ENTRIES, a list of manifest entries, in the context of PROFILE." `((verbosity . 0) (graft? . #t) (substitutes? . #t) - (build-hook? . #t))) + (build-hook? . #t) + (print-build-trace? . #t))) (define (show-help) (display (G_ "Usage: guix package [OPTION]... @@ -930,18 +931,24 @@ processed, #f otherwise." (arg-handler arg result) (leave (G_ "~A: extraneous argument~%") arg))) - (let ((opts (parse-command-line args %options (list %default-options #f) - #:argument-handler handle-argument))) - (with-error-handling - (or (process-query opts) - (parameterize ((%store (open-connection)) - (%graft? (assoc-ref opts 'graft?))) - (set-build-options-from-command-line (%store) opts) - - (parameterize ((%guile-for-build - (package-derivation - (%store) - (if (assoc-ref opts 'bootstrap?) - %bootstrap-guile - (canonical-package guile-2.2))))) - (process-actions (%store) opts))))))) + (define opts + (parse-command-line args %options (list %default-options #f) + #:argument-handler handle-argument)) + (define verbose? + (assoc-ref opts 'verbose?)) + + (with-error-handling + (or (process-query opts) + (parameterize ((%store (open-connection)) + (%graft? (assoc-ref opts 'graft?))) + (set-build-options-from-command-line (%store) opts) + + (parameterize ((%guile-for-build + (package-derivation + (%store) + (if (assoc-ref opts 'bootstrap?) + %bootstrap-guile + (canonical-package guile-2.2)))) + (current-build-output-port + (build-output-port #:verbose? verbose?))) + (process-actions (%store) opts)))))) |