diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-01-12 22:20:30 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-01-12 23:41:15 +0100 |
commit | d06d54e338064d84a59c5811587b930799aab208 (patch) | |
tree | 86e46e4031a20534d8dc68cace7a274a385737b2 /guix/scripts | |
parent | 6b433caed2c86bf41acfa65dd507292e8a0ab2ac (diff) | |
download | gnu-guix-d06d54e338064d84a59c5811587b930799aab208.tar gnu-guix-d06d54e338064d84a59c5811587b930799aab208.tar.gz |
offload: Fix regression in file retrieval.
This fixes a regression in 'retrieve-files*' introduced in
896fec476f728183b331cbb6e2afb891207b4205, whereby (guix scripts offload)
would not read the initial sexp now sent by the remote host via
'store-export-channel'. This would effectively prevent file retrieval
entirely when offloading.
* guix/ssh.scm (retrieve-files*): New procedure, like former
'retrieve-files' but with an extra #:import parameter.
(retrieve-files): Rewrite in terms of 'retrieve-files*'.
(file-retrieval-port): Make private.
* guix/scripts/offload.scm (transfer-and-offload): Pass #:import to
'retrieve-files*'.
(retrieve-files*): Remove.
Diffstat (limited to 'guix/scripts')
-rw-r--r-- | guix/scripts/offload.scm | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm index 7e114fa2c9..25efe90e79 100644 --- a/guix/scripts/offload.scm +++ b/guix/scripts/offload.scm @@ -358,26 +358,19 @@ MACHINE." (parameterize ((current-build-output-port (build-log-port))) (build-derivations store (list drv)))) - (retrieve-files* outputs store) + (retrieve-files* outputs store + + ;; We cannot use the 'import-paths' RPC here because we + ;; already hold the locks for FILES. + #:import + (lambda (port) + (restore-file-set port + #:log-port (current-error-port) + #:lock? #f))) + (format (current-error-port) "done with offloaded '~a'~%" (derivation-file-name drv))) -(define (retrieve-files* files remote) - "Retrieve FILES from REMOTE and import them using 'restore-file-set'." - (let-values (((port count) - (file-retrieval-port files remote))) - (format #t (N_ "retrieving ~a store item from '~a'...~%" - "retrieving ~a store items from '~a'...~%" count) - count (remote-store-host remote)) - - ;; We cannot use the 'import-paths' RPC here because we already - ;; hold the locks for FILES. - (let ((result (restore-file-set port - #:log-port (current-error-port) - #:lock? #f))) - (close-port port) - result))) - ;;; ;;; Scheduling. |