summaryrefslogtreecommitdiff
path: root/guix/scripts/offload.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/scripts/offload.scm')
-rw-r--r--guix/scripts/offload.scm27
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.