[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
14/16: copy: Use 'with-build-handler'.
From: |
guix-commits |
Subject: |
14/16: copy: Use 'with-build-handler'. |
Date: |
Sun, 22 Mar 2020 07:43:14 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 3e6f65be7ae6f895ceb38f9a129c95e08761182b
Author: Ludovic Courtès <address@hidden>
AuthorDate: Sun Mar 22 12:26:05 2020 +0100
copy: Use 'with-build-handler'.
* guix/scripts/copy.scm (send-to-remote-host): Remove explicit
'show-what-to-build' call. Call 'build-derivations' unconditionally.
(guix-copy): Wrap 'with-status-verbosity' in 'with-build-handler'.
---
guix/scripts/copy.scm | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/guix/scripts/copy.scm b/guix/scripts/copy.scm
index fdb684c..2fa31ec 100644
--- a/guix/scripts/copy.scm
+++ b/guix/scripts/copy.scm
@@ -68,12 +68,7 @@ package names, build the underlying packages before sending
them."
(ssh-spec->user+host+port target))
((drv items)
(options->derivations+files local opts)))
- (show-what-to-build local drv
- #:use-substitutes? (assoc-ref opts 'substitutes?)
- #:dry-run? (assoc-ref opts 'dry-run?))
-
- (and (or (assoc-ref opts 'dry-run?)
- (build-derivations local drv))
+ (and (build-derivations local drv)
(let* ((session (open-ssh-session host #:user user
#:port (or port 22)))
(sent (send-files local items
@@ -178,7 +173,11 @@ Copy ITEMS to or from the specified host over SSH.\n"))
(target (assoc-ref opts 'destination)))
(with-store store
(set-build-options-from-command-line store opts)
- (with-status-verbosity (assoc-ref opts 'verbosity)
- (cond (target (send-to-remote-host store target opts))
- (source (retrieve-from-remote-host store source opts))
- (else (leave (G_ "use '--to' or '--from'~%")))))))))
+ (with-build-handler (build-notifier #:use-substitutes?
+ (assoc-ref opts 'substitutes?)
+ #:dry-run?
+ (assoc-ref opts 'dry-run?))
+ (with-status-verbosity (assoc-ref opts 'verbosity)
+ (cond (target (send-to-remote-host store target opts))
+ (source (retrieve-from-remote-host store source opts))
+ (else (leave (G_ "use '--to' or '--from'~%"))))))))))
- 04/16: guix build: Use 'with-build-handler'., (continued)
- 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
- 09/16: ui: 'show-what-to-build' returns true when there are grafts to build., guix-commits, 2020/03/22
- 11/16: ui: 'build-notifier' invokes continuation when there's nothing to do., guix-commits, 2020/03/22
- 14/16: copy: Use 'with-build-handler'.,
guix-commits <=
- 16/16: hydra: evaluate: Use 'with-build-handler'., guix-commits, 2020/03/22