diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2020-09-05 21:56:34 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2020-09-05 22:30:04 +0300 |
commit | de3c03a47160dec355d9b19ad5ca210d90c15fd7 (patch) | |
tree | 4ca6dc05b5fc9530d812bbb269f1c61ab9efccf3 /guix/scripts/copy.scm | |
parent | ab6fe9d362046231ad6f46eccfd1ea2c9c80b401 (diff) | |
parent | b8477cab7bccc4191ed3dfa3f149aec7917834d8 (diff) | |
download | guix-patches-de3c03a47160dec355d9b19ad5ca210d90c15fd7.tar guix-patches-de3c03a47160dec355d9b19ad5ca210d90c15fd7.tar.gz |
Merge remote-tracking branch 'origin/master' into staging
Diffstat (limited to 'guix/scripts/copy.scm')
-rw-r--r-- | guix/scripts/copy.scm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/guix/scripts/copy.scm b/guix/scripts/copy.scm index f6f64d0a11..274620fc1e 100644 --- a/guix/scripts/copy.scm +++ b/guix/scripts/copy.scm @@ -20,6 +20,7 @@ #:use-module (guix ui) #:use-module (guix scripts) #:use-module (guix ssh) + #:use-module ((ssh session) #:select (disconnect!)) #:use-module (guix store) #:use-module ((guix status) #:select (with-status-verbosity)) #:use-module (guix utils) @@ -71,9 +72,10 @@ package names, build the underlying packages before sending them." (and (build-derivations local drv) (let* ((session (open-ssh-session host #:user user #:port (or port 22))) - (sent (send-files local items - (connect-to-remote-daemon session) + (remote (connect-to-remote-daemon session)) + (sent (send-files local items remote #:recursive? #t))) + (close-connection remote) (format #t "~{~a~%~}" sent) sent)))) @@ -93,6 +95,8 @@ package names, build the underlying packages before sending them." (options->derivations+files local opts)) ((retrieved) (retrieve-files local items remote #:recursive? #t))) + (close-connection remote) + (disconnect! session) (format #t "~{~a~%~}" retrieved) retrieved))) @@ -175,6 +179,8 @@ Copy ITEMS to or from the specified host over SSH.\n")) (set-build-options-from-command-line store opts) (with-build-handler (build-notifier #:use-substitutes? (assoc-ref opts 'substitutes?) + #:verbosity + (assoc-ref opts 'verbosity) #:dry-run? (assoc-ref opts 'dry-run?)) (with-status-verbosity (assoc-ref opts 'verbosity) |