mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-27 04:59:27 -05:00
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'.
This commit is contained in:
parent
81c0b52bd6
commit
3e6f65be7a
1 changed files with 9 additions and 10 deletions
|
@ -68,12 +68,7 @@ (define (send-to-remote-host local target opts)
|
|||
(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 @@ (define (guix-copy . args)
|
|||
(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'~%"))))))))))
|
||||
|
|
Loading…
Reference in a new issue