summaryrefslogtreecommitdiff
path: root/guix/scripts/offload.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-10-19 14:28:56 +0200
committerLudovic Courtès <ludo@gnu.org>2016-10-19 15:54:10 +0200
commit2535635f182d6a2aca5689adb5551fdd7c7e2d0a (patch)
tree3e48af047c9377074a3909ea3aa4114c4153acf6 /guix/scripts/offload.scm
parent4bb54cc42ff5653fe59f5a8ebf39515ba1840a6d (diff)
Use (ice-9 binary-ports) instead of (rnrs io ports).
This reduces the closure of (guix ui) from 123 to 106 modules. * guix/derivations.scm: Use (ice-9 binary-ports) instead of (rnrs io ports). (map-derivation)[substitute-file]: Use 'read-string' instead of 'get-string-all'. * guix/ftp-client.scm: Likewise. * guix/hash.scm: Likewise. * guix/http-client.scm: Likewise. * guix/pki.scm (ensure-acl, current-acl): Likewise. * guix/scripts/archive.scm (authorize-key)[read-key]: Likewise. * guix/scripts/authenticate.scm (read-canonical-sexp) (read-hash-data): Likewise. * guix/scripts/download.scm: Likewise. * guix/scripts/offload.scm (register-gc-root, remove-gc-roots) (send-files): Likewise. * guix/scripts/publish.scm (lazy-read-file-sexp): Likewise. * guix/scripts/refresh.scm: Likewise. * guix/scripts/substitute.scm (check-acl-initialized): Likewise. * guix/serialization.scm (read-maybe-utf8-string): Likewise. * guix/scripts/hash.scm (guix-hash): Use 'force-output' instead of 'flush-output-port'. * guix/store.scm (process-stderr): Likewise. * guix/tests.scm: Likewise. * guix/utils.scm: Use (ice-9 binary-ports) and autoload (rnrs io ports) for 'make-custom-binary-input-port'.
Diffstat (limited to 'guix/scripts/offload.scm')
-rw-r--r--guix/scripts/offload.scm11
1 files changed, 6 insertions, 5 deletions
diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm
index b278f1e313..33d141e7ef 100644
--- a/guix/scripts/offload.scm
+++ b/guix/scripts/offload.scm
@@ -21,7 +21,8 @@
#:use-module (guix records)
#:use-module (guix store)
#:use-module (guix derivations)
- #:use-module (guix serialization)
+ #:use-module ((guix serialization)
+ #:select (nar-error? nar-error-file))
#:use-module (guix nar)
#:use-module (guix utils)
#:use-module ((guix build syscalls) #:select (fcntl-flock))
@@ -37,7 +38,7 @@
#:use-module (ice-9 match)
#:use-module (ice-9 regex)
#:use-module (ice-9 format)
- #:use-module (rnrs io ports)
+ #:use-module (ice-9 binary-ports)
#:export (build-machine
build-requirements
guix-offload))
@@ -336,7 +337,7 @@ hook."
(let ((pipe (remote-pipe machine OPEN_READ
`("guile" "-c" ,(object->string script)))))
- (get-string-all pipe)
+ (read-string pipe)
(let ((status (close-pipe pipe)))
(unless (zero? status)
;; Better be safe than sorry: if we ignore the error here, then FILE
@@ -368,7 +369,7 @@ hook."
(let ((pipe (remote-pipe machine OPEN_READ
`("guile" "-c" ,(object->string script)))))
- (get-string-all pipe)
+ (read-string pipe)
(close-pipe pipe)))
(define* (offload drv machine
@@ -462,7 +463,7 @@ success, #f otherwise."
'("guix" "archive" "--missing")))
(open-input-string files)))
((result)
- (get-string-all missing)))
+ (read-string missing)))
(for-each waitpid pids)
(string-tokenize result)))