From 2535635f182d6a2aca5689adb5551fdd7c7e2d0a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 19 Oct 2016 14:28:56 +0200 Subject: 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'. --- guix/derivations.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guix/derivations.scm') diff --git a/guix/derivations.scm b/guix/derivations.scm index 7f74ed6c77..e378a7cb03 100644 --- a/guix/derivations.scm +++ b/guix/derivations.scm @@ -23,7 +23,7 @@ #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) - #:use-module (rnrs io ports) + #:use-module (ice-9 binary-ports) #:use-module (rnrs bytevectors) #:use-module (ice-9 match) #:use-module (ice-9 rdelim) @@ -885,7 +885,7 @@ recursively." (define (substitute-file file initial replacements) (define contents (with-fluids ((%default-port-encoding #f)) - (call-with-input-file file get-string-all))) + (call-with-input-file file read-string))) (let ((updated (substitute contents initial replacements))) (if (string=? updated contents) -- cgit v1.2.3