summaryrefslogtreecommitdiff
path: root/gnu/build
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2025-09-12 16:33:58 +0200
committerLudovic Courtès <ludo@gnu.org>2025-09-21 17:57:16 +0200
commit1567529b919280dcedc7e0ab483e211cb282b5a6 (patch)
tree79811e131079f2eaacdcd30fa7f31ed4b8f4709d /gnu/build
parent9de6ed0a7eb8e1b7ac1d1ce9c725667336308ecd (diff)
services: secret-service: Remove redundant ‘dump’ procedure.
* gnu/build/secret-service.scm (secret-service-receive-secrets)[dump]: Remove. Use ‘dump-port’ from (guix build utils) instead. Change-Id: I5a098a6f4f6629cf275862e9f10c9a2718bb27a1
Diffstat (limited to 'gnu/build')
-rw-r--r--gnu/build/secret-service.scm19
1 files changed, 1 insertions, 18 deletions
diff --git a/gnu/build/secret-service.scm b/gnu/build/secret-service.scm
index 615dd3535e4..b8cd77081ca 100644
--- a/gnu/build/secret-service.scm
+++ b/gnu/build/secret-service.scm
@@ -190,23 +190,6 @@ Return the list of files installed on success, and #f otherwise."
(close-port sock)
#f))))
- ;; TODO: Remove when (@ (guix build utils) dump-port) has a 'size'
- ;; parameter.
- (define (dump in out size)
- ;; Copy SIZE bytes from IN to OUT.
- (define buf-size 65536)
- (define buf (make-bytevector buf-size))
-
- (let loop ((left size))
- (if (<= left 0)
- 0
- (let ((read (get-bytevector-n! in buf 0 (min left buf-size))))
- (if (eof-object? read)
- left
- (begin
- (put-bytevector out buf 0 read)
- (loop (- left read))))))))
-
(define (read-secrets port)
;; Read secret files from PORT and install them.
(match (false-if-exception (read port))
@@ -224,7 +207,7 @@ Return the list of files installed on success, and #f otherwise."
(call-with-output-file file
(lambda (output)
- (dump port output size)
+ (dump-port port output size)
(chmod file mode))))
files sizes modes)
(log "received ~a secret files~%" (length files))