[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/16: deploy: Use 'with-build-handler'.
From: |
guix-commits |
Subject: |
05/16: deploy: Use 'with-build-handler'. |
Date: |
Sun, 22 Mar 2020 07:43:11 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit bdda46a67d5b8d9d45a53a7d6b32d9acb9374ae2
Author: Ludovic Courtès <address@hidden>
AuthorDate: Wed Mar 18 22:57:28 2020 +0100
deploy: Use 'with-build-handler'.
Until now, 'guix deploy' would never display what is going to be built.
* guix/scripts/deploy.scm (guix-deploy): Wrap 'for-each' in
'with-build-handler'.
---
guix/scripts/deploy.scm | 34 ++++++++++++++++++----------------
1 file changed, 18 insertions(+), 16 deletions(-)
diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm
index ad05c33..a82dde00 100644
--- a/guix/scripts/deploy.scm
+++ b/guix/scripts/deploy.scm
@@ -108,19 +108,21 @@ Perform the deployment specified by FILE.\n"))
(with-status-verbosity (assoc-ref opts 'verbosity)
(with-store store
(set-build-options-from-command-line store opts)
- (for-each (lambda (machine)
- (info (G_ "deploying to ~a...~%")
- (machine-display-name machine))
- (parameterize ((%graft? (assq-ref opts 'graft?)))
- (guard (c ((message-condition? c)
- (report-error (G_ "failed to deploy ~a: ~a~%")
- (machine-display-name machine)
- (condition-message c)))
- ((deploy-error? c)
- (when (deploy-error-should-roll-back c)
- (info (G_ "rolling back ~a...~%")
- (machine-display-name machine))
- (run-with-store store (roll-back-machine
machine)))
- (apply throw (deploy-error-captured-args c))))
- (run-with-store store (deploy-machine machine)))))
- machines)))))
+ (with-build-handler (build-notifier #:use-substitutes?
+ (assoc-ref opts 'substitutes?))
+ (for-each (lambda (machine)
+ (info (G_ "deploying to ~a...~%")
+ (machine-display-name machine))
+ (parameterize ((%graft? (assq-ref opts 'graft?)))
+ (guard (c ((message-condition? c)
+ (report-error (G_ "failed to deploy ~a:
~a~%")
+ (machine-display-name machine)
+ (condition-message c)))
+ ((deploy-error? c)
+ (when (deploy-error-should-roll-back c)
+ (info (G_ "rolling back ~a...~%")
+ (machine-display-name machine))
+ (run-with-store store (roll-back-machine
machine)))
+ (apply throw (deploy-error-captured-args
c))))
+ (run-with-store store (deploy-machine machine)))))
+ machines))))))
- branch master updated (1550db6 -> 66a198c), guix-commits, 2020/03/22
- 02/16: store: Add 'with-build-handler'., guix-commits, 2020/03/22
- 05/16: deploy: Use 'with-build-handler'.,
guix-commits <=
- 01/16: syscalls: 'with-file-lock' re-grabs lock when reentering its dynamic extent., guix-commits, 2020/03/22
- 03/16: ui: Add a notification build handler., guix-commits, 2020/03/22
- 04/16: guix build: Use 'with-build-handler'., guix-commits, 2020/03/22
- 08/16: guix system: Use 'with-build-handler'., guix-commits, 2020/03/22
- 10/16: ui: 'show-what-to-build' returns two values, for builds and downloads., guix-commits, 2020/03/22
- 12/16: copy: Factorize 'with-store' & co., guix-commits, 2020/03/22
- 15/16: packages: 'package-field-location' handles missing source properties., guix-commits, 2020/03/22
- 13/16: copy: Actually implement '--dry-run'., guix-commits, 2020/03/22
- 07/16: guix package, pull: Use 'with-build-handler'., guix-commits, 2020/03/22
- 06/16: pack: Use 'with-build-handler'., guix-commits, 2020/03/22