From e6581cc5f9567e4bf100e1d3e052b3f467656d49 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Mon, 2 Mar 2026 12:19:44 +0000 Subject: [PATCH] store: Export the %default-store-connection-buffer-size. So it can be used elsewhere, for example where port->connection is used and there's a need to setup buffering. * guix/store.scm (%default-buffer-size): Rename to %default-store-connection-buffer-size. (connect-to-daemon, open-connection): Update accordingly. Change-Id: Ieb932577304786e5dee891ad1652e03c388d4112 --- guix/store.scm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/guix/store.scm b/guix/store.scm index 30344da91f..ec72786f34 100644 --- a/guix/store.scm +++ b/guix/store.scm @@ -118,6 +118,8 @@ set-store-connection-cache set-store-connection-cache! + %default-store-connection-buffer-size + connect-to-daemon open-connection port->connection @@ -356,10 +358,11 @@ non-blocking." (errno (system-error-errno args))))) (loop rest))))))))) -(define %default-buffer-size 8192) +(define %default-store-connection-buffer-size 8192) (define* (connect-to-daemon uri-or-filename #:key non-blocking? - (buffer-size %default-buffer-size)) + (buffer-size + %default-store-connection-buffer-size)) "Connect to the daemon at URI-OR-FILENAME and return an input/output port. If NON-BLOCKING?, use a non-blocking socket when using the file, unix or guix URI schemes. Use BUFFER-SIZE defaulting to 8192. @@ -406,7 +409,8 @@ the daemon. Use 'open-connection' for that." (define* (open-connection #:optional (uri (%daemon-socket-uri)) #:key port (reserve-space? #t) cpu-affinity non-blocking? built-in-builders - (buffer-size %default-buffer-size)) + (buffer-size + %default-store-connection-buffer-size)) "Connect to the daemon at URI (a string), or, if PORT is not #f, use it as the I/O port over which to communicate to a build daemon.