summaryrefslogtreecommitdiff
path: root/guix/scripts/environment.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-01-09 14:17:19 +0100
committerLudovic Courtès <ludo@gnu.org>2019-01-11 12:14:38 +0100
commitf1de676ea82c2bed9a435fce37ade0186296bfc9 (patch)
tree993fcf63248840899470ad343e816cf3c49b418a /guix/scripts/environment.scm
parent7804c45b9ce5a8edd06452d828249e588ae26263 (diff)
guix build: Re-purpose '--verbosity' and add '--debug'.
The previous '--verbosity' option was misleading and rarely what users were looking for. The new option provides a consistent way to choose whether or not to display the build log. * guix/scripts/build.scm (show-build-options-help): Remove "--verbosity" and add "--debug". (set-build-options-from-command-line): Use the 'debug key of OPTS for #:verbosity. (%standard-build-options): Change "verbosity" to "debug". Use 'string->number*' instead of 'string->number'. (%default-options): Change 'verbosity to 'debug and add a 'verbosity key. (show-help): Add '--verbosity'. (%options): Likewise, and change '--quiet' to set the 'verbosity key of RESULT. (guix-build): Use 'with-status-verbosity' instead of parameterizing CURRENT-BUILD-OUTPUT-PORT, honor the 'verbosity key of OPTS, and remove 'quiet?'. * guix/scripts/environment.scm (show-help, %options): Add '--verbosity'. (%default-options): Add 'debug'. (guix-environment): Honor the 'verbosity key of OPTS. * guix/scripts/pack.scm (%default-options): Add 'debug. (%options, show-help): Add '--verbosity'. (guix-pack): Honor the 'verbosity key of OPTS. * guix/scripts/package.scm (%default-options): Add 'debug. (show-help, %options): Add '--verbosity'. Mark '--verbose' as deprecated and change it to set 'verbosity. (guix-package): Honor the 'verbosity key of OPTS and remove 'verbose?'. * guix/scripts/pull.scm (%default-options): Add 'debug. (show-help, %options): Add '--verbosity'. (guix-pull): Honor the 'verbosity key of OPTS. * guix/scripts/system.scm (show-help, %options): Add '--verbosity'. (%default-options): Add 'debug. (guix-system): Honor the 'verbosity key of OPTS. * guix/scripts/archive.scm (%default-options): Add 'debug, 'print-build-trace?, 'print-extended-build-trace?, and 'multiplexed-build-output?. (show-help, %options): Add '--verbosity'. (export-from-store): Remove call to 'set-build-options-from-command-line'. (guix-archive): Wrap body in 'with-status-verbosity'. Add call to 'set-build-options-from-command-line. * doc/guix.texi (Common Build Options): Document '--verbosity' and '--debug'. (Additional Build Options): Adjust description of '--quiet'.
Diffstat (limited to 'guix/scripts/environment.scm')
-rw-r--r--guix/scripts/environment.scm12
1 files changed, 10 insertions, 2 deletions
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 9461d04976..116b8dcbce 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -158,6 +158,8 @@ COMMAND or an interactive shell in that environment.\n"))
--expose=SPEC for containers, expose read-only host file system
according to SPEC"))
(display (G_ "
+ -v, --verbosity=LEVEL use the given verbosity LEVEL"))
+ (display (G_ "
--bootstrap use bootstrap binaries to build the environment"))
(newline)
(show-build-options-help)
@@ -179,7 +181,8 @@ COMMAND or an interactive shell in that environment.\n"))
(print-build-trace? . #t)
(print-extended-build-trace? . #t)
(multiplexed-build-output? . #t)
- (verbosity . 0)))
+ (debug . 0)
+ (verbosity . 2)))
(define (tag-package-arg opts arg)
"Return a two-element list with the form (TAG ARG) that tags ARG with either
@@ -260,6 +263,11 @@ COMMAND or an interactive shell in that environment.\n"))
(option '(#\r "root") #t #f
(lambda (opt name arg result)
(alist-cons 'gc-root arg result)))
+ (option '(#\v "verbosity") #t #f
+ (lambda (opt name arg result)
+ (let ((level (string->number* arg)))
+ (alist-cons 'verbosity level
+ (alist-delete 'verbosity result)))))
(option '("bootstrap") #f #f
(lambda (opt name arg result)
(alist-cons 'bootstrap? #t result)))
@@ -674,7 +682,7 @@ message if any test fails."
(leave (G_ "'--user' cannot be used without '--container'~%")))
(with-store store
- (with-status-verbosity 1
+ (with-status-verbosity (assoc-ref opts 'verbosity)
(define manifest
(options/resolve-packages store opts))