scripts: Pass #:verbosity to 'build-notifier'.
* guix/scripts/archive.scm (guix-archive): Pass #:verbosity to 'build-notifier'. * guix/scripts/build.scm (guix-build): Likewise. * guix/scripts/copy.scm (guix-copy): Likewise. * guix/scripts/deploy.scm (guix-deploy): Likewise. * guix/scripts/environment.scm (guix-environment): Likewise. * guix/scripts/pack.scm (guix-pack): Likewise. * guix/scripts/package.scm (guix-package*): Likewise. * guix/scripts/pull.scm (guix-pull): Likewise. * guix/scripts/system.scm (verbosity-level): New procedure. (process-action): Pass #:verbosity to 'build-notifier'. (guix-system): Use 'verbosity-level' for 'with-status-verbosity'.
This commit is contained in:
parent
a55d83b546
commit
898e6d0a07
@ -380,6 +380,8 @@ output port."
|
|||||||
(with-build-handler
|
(with-build-handler
|
||||||
(build-notifier #:use-substitutes?
|
(build-notifier #:use-substitutes?
|
||||||
(assoc-ref opts 'substitutes?)
|
(assoc-ref opts 'substitutes?)
|
||||||
|
#:verbosity
|
||||||
|
(assoc-ref opts 'verbosity)
|
||||||
#:dry-run?
|
#:dry-run?
|
||||||
(assoc-ref opts 'dry-run?))
|
(assoc-ref opts 'dry-run?))
|
||||||
(cond ((assoc-ref opts 'export)
|
(cond ((assoc-ref opts 'export)
|
||||||
|
@ -961,6 +961,8 @@ needed."
|
|||||||
|
|
||||||
(with-build-handler (build-notifier #:use-substitutes?
|
(with-build-handler (build-notifier #:use-substitutes?
|
||||||
(assoc-ref opts 'substitutes?)
|
(assoc-ref opts 'substitutes?)
|
||||||
|
#:verbosity
|
||||||
|
(assoc-ref opts 'verbosity)
|
||||||
#:dry-run?
|
#:dry-run?
|
||||||
(assoc-ref opts 'dry-run?))
|
(assoc-ref opts 'dry-run?))
|
||||||
(parameterize ((current-terminal-columns (terminal-columns))
|
(parameterize ((current-terminal-columns (terminal-columns))
|
||||||
|
@ -175,6 +175,8 @@ Copy ITEMS to or from the specified host over SSH.\n"))
|
|||||||
(set-build-options-from-command-line store opts)
|
(set-build-options-from-command-line store opts)
|
||||||
(with-build-handler (build-notifier #:use-substitutes?
|
(with-build-handler (build-notifier #:use-substitutes?
|
||||||
(assoc-ref opts 'substitutes?)
|
(assoc-ref opts 'substitutes?)
|
||||||
|
#:verbosity
|
||||||
|
(assoc-ref opts 'verbosity)
|
||||||
#:dry-run?
|
#:dry-run?
|
||||||
(assoc-ref opts 'dry-run?))
|
(assoc-ref opts 'dry-run?))
|
||||||
(with-status-verbosity (assoc-ref opts 'verbosity)
|
(with-status-verbosity (assoc-ref opts 'verbosity)
|
||||||
|
@ -151,7 +151,9 @@ Perform the deployment specified by FILE.\n"))
|
|||||||
(with-store store
|
(with-store store
|
||||||
(set-build-options-from-command-line store opts)
|
(set-build-options-from-command-line store opts)
|
||||||
(with-build-handler (build-notifier #:use-substitutes?
|
(with-build-handler (build-notifier #:use-substitutes?
|
||||||
(assoc-ref opts 'substitutes?))
|
(assoc-ref opts 'substitutes?)
|
||||||
|
#:verbosity
|
||||||
|
(assoc-ref opts 'verbosity))
|
||||||
(parameterize ((%graft? (assq-ref opts 'graft?)))
|
(parameterize ((%graft? (assq-ref opts 'graft?)))
|
||||||
(map/accumulate-builds store
|
(map/accumulate-builds store
|
||||||
(cut deploy-machine* store <>)
|
(cut deploy-machine* store <>)
|
||||||
|
@ -708,6 +708,8 @@ message if any test fails."
|
|||||||
(with-store store
|
(with-store store
|
||||||
(with-build-handler (build-notifier #:use-substitutes?
|
(with-build-handler (build-notifier #:use-substitutes?
|
||||||
(assoc-ref opts 'substitutes?)
|
(assoc-ref opts 'substitutes?)
|
||||||
|
#:verbosity
|
||||||
|
(assoc-ref opts 'verbosity)
|
||||||
#:dry-run?
|
#:dry-run?
|
||||||
(assoc-ref opts 'dry-run?))
|
(assoc-ref opts 'dry-run?))
|
||||||
(with-status-verbosity (assoc-ref opts 'verbosity)
|
(with-status-verbosity (assoc-ref opts 'verbosity)
|
||||||
|
@ -1153,6 +1153,8 @@ Create a bundle of PACKAGE.\n"))
|
|||||||
|
|
||||||
(with-build-handler (build-notifier #:dry-run?
|
(with-build-handler (build-notifier #:dry-run?
|
||||||
(assoc-ref opts 'dry-run?)
|
(assoc-ref opts 'dry-run?)
|
||||||
|
#:verbosity
|
||||||
|
(assoc-ref opts 'verbosity)
|
||||||
#:use-substitutes?
|
#:use-substitutes?
|
||||||
(assoc-ref opts 'substitutes?))
|
(assoc-ref opts 'substitutes?))
|
||||||
(parameterize ((%graft? (assoc-ref opts 'graft?))
|
(parameterize ((%graft? (assoc-ref opts 'graft?))
|
||||||
|
@ -965,6 +965,8 @@ option processing with 'parse-command-line'."
|
|||||||
(set-build-options-from-command-line (%store) opts)
|
(set-build-options-from-command-line (%store) opts)
|
||||||
(with-build-handler (build-notifier #:use-substitutes?
|
(with-build-handler (build-notifier #:use-substitutes?
|
||||||
(assoc-ref opts 'substitutes?)
|
(assoc-ref opts 'substitutes?)
|
||||||
|
#:verbosity
|
||||||
|
(assoc-ref opts 'verbosity)
|
||||||
#:dry-run?
|
#:dry-run?
|
||||||
(assoc-ref opts 'dry-run?))
|
(assoc-ref opts 'dry-run?))
|
||||||
(parameterize ((%guile-for-build
|
(parameterize ((%guile-for-build
|
||||||
|
@ -773,6 +773,8 @@ Use '~/.config/guix/channels.scm' instead."))
|
|||||||
(%graft? (assoc-ref opts 'graft?)))
|
(%graft? (assoc-ref opts 'graft?)))
|
||||||
(with-build-handler (build-notifier #:use-substitutes?
|
(with-build-handler (build-notifier #:use-substitutes?
|
||||||
substitutes?
|
substitutes?
|
||||||
|
#:verbosity
|
||||||
|
(assoc-ref opts 'verbosity)
|
||||||
#:dry-run? dry-run?)
|
#:dry-run? dry-run?)
|
||||||
(set-build-options-from-command-line store opts)
|
(set-build-options-from-command-line store opts)
|
||||||
(ensure-default-profile)
|
(ensure-default-profile)
|
||||||
|
@ -1067,6 +1067,12 @@ Some ACTIONS support additional ARGS.\n"))
|
|||||||
(image-size . guess)
|
(image-size . guess)
|
||||||
(install-bootloader? . #t)))
|
(install-bootloader? . #t)))
|
||||||
|
|
||||||
|
(define (verbosity-level opts)
|
||||||
|
"Return the verbosity level based on OPTS, the alist of parsed options."
|
||||||
|
(or (assoc-ref opts 'verbosity)
|
||||||
|
(if (eq? (assoc-ref opts 'action) 'build)
|
||||||
|
2 1)))
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
;;; Entry point.
|
;;; Entry point.
|
||||||
@ -1126,6 +1132,8 @@ resulting from command-line parsing."
|
|||||||
|
|
||||||
(with-build-handler (build-notifier #:use-substitutes?
|
(with-build-handler (build-notifier #:use-substitutes?
|
||||||
(assoc-ref opts 'substitutes?)
|
(assoc-ref opts 'substitutes?)
|
||||||
|
#:verbosity
|
||||||
|
(verbosity-level opts)
|
||||||
#:dry-run?
|
#:dry-run?
|
||||||
(assoc-ref opts 'dry-run?))
|
(assoc-ref opts 'dry-run?))
|
||||||
(run-with-store store
|
(run-with-store store
|
||||||
@ -1282,8 +1290,7 @@ argument list and OPTS is the option alist."
|
|||||||
(args (option-arguments opts))
|
(args (option-arguments opts))
|
||||||
(command (assoc-ref opts 'action)))
|
(command (assoc-ref opts 'action)))
|
||||||
(parameterize ((%graft? (assoc-ref opts 'graft?)))
|
(parameterize ((%graft? (assoc-ref opts 'graft?)))
|
||||||
(with-status-verbosity (or (assoc-ref opts 'verbosity)
|
(with-status-verbosity (verbosity-level opts)
|
||||||
(if (eq? command 'build) 2 1))
|
|
||||||
(process-command command args opts))))))
|
(process-command command args opts))))))
|
||||||
|
|
||||||
;;; Local Variables:
|
;;; Local Variables:
|
||||||
|
Loading…
Reference in New Issue
Block a user