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/pki.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'guix/pki.scm') diff --git a/guix/pki.scm b/guix/pki.scm index 3cd9763fdf..1551425c33 100644 --- a/guix/pki.scm +++ b/guix/pki.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014 Ludovic Courtès +;;; Copyright © 2013, 2014, 2016 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,7 +22,8 @@ (define-module (guix pki) #:use-module ((guix utils) #:select (with-atomic-file-output)) #:use-module ((guix build utils) #:select (mkdir-p)) #:use-module (ice-9 match) - #:use-module (rnrs io ports) + #:use-module (ice-9 rdelim) + #:use-module (ice-9 binary-ports) #:export (%public-key-file %private-key-file %acl-file @@ -80,7 +81,7 @@ (define (ensure-acl) (when (file-exists? %public-key-file) (let ((public-key (call-with-input-file %public-key-file (compose string->canonical-sexp - get-string-all)))) + read-string)))) (mkdir-p (dirname %acl-file)) (with-atomic-file-output %acl-file (lambda (port) @@ -99,7 +100,7 @@ (define (current-acl) (call-with-input-file %acl-file (compose canonical-sexp->sexp string->canonical-sexp - get-string-all)) + read-string)) (public-keys->acl '()))) ; the empty ACL (define (acl->public-keys acl) -- cgit v1.2.3