Skip to content
Snippets Groups Projects
Unverified Commit 0e3c8528 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

ssh: 'retrieve-files' now only retrieves what's missing.

* guix/ssh.scm (retrieve-files): Remove the subset of FILES that is
valid in LOCAL.
(store-export-channel): Add comment.
parent d06d54e3
No related branches found
No related tags found
No related merge requests found
...@@ -28,6 +28,7 @@ (define-module (guix ssh) ...@@ -28,6 +28,7 @@ (define-module (guix ssh)
#:use-module (ssh session) #:use-module (ssh session)
#:use-module (ssh dist) #:use-module (ssh dist)
#:use-module (ssh dist node) #:use-module (ssh dist node)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-11) #:use-module (srfi srfi-11)
#:use-module (srfi srfi-26) #:use-module (srfi srfi-26)
#:use-module (srfi srfi-34) #:use-module (srfi srfi-34)
...@@ -235,6 +236,10 @@ (define export ...@@ -235,6 +236,10 @@ (define export
(write `(invalid-items ,invalid)) (write `(invalid-items ,invalid))
(exit 1)) (exit 1))
;; TODO: When RECURSIVE? is true, we could send the list of store
;; items in the closure so that the other end can filter out
;; those it already has.
(write '(exporting)) ;we're ready (write '(exporting)) ;we're ready
(force-output) (force-output)
...@@ -394,7 +399,8 @@ (define* (retrieve-files local files remote ...@@ -394,7 +399,8 @@ (define* (retrieve-files local files remote
#:key recursive? (log-port (current-error-port))) #:key recursive? (log-port (current-error-port)))
"Retrieve FILES from REMOTE and import them using the 'import-paths' RPC on "Retrieve FILES from REMOTE and import them using the 'import-paths' RPC on
LOCAL. When RECURSIVE? is true, retrieve the closure of FILES." LOCAL. When RECURSIVE? is true, retrieve the closure of FILES."
(retrieve-files* files remote (retrieve-files* (remove (cut valid-path? local <>) files)
remote
#:recursive? recursive? #:recursive? recursive?
#:log-port log-port #:log-port log-port
#:import (lambda (port) #:import (lambda (port)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment