GNU bug report logs -
#71038
[PATCH 0/2] Enable specifying the available builtin builders.
Previous Next
Reported by: Christopher Baines <mail <at> cbaines.net>
Date: Sat, 18 May 2024 13:13:01 UTC
Severity: normal
Tags: patch
Done: Christopher Baines <mail <at> cbaines.net>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 71038 <at> debbugs.gnu.org (full text, mbox):
To open-connection and port->connection. This overrides the discovered
builtin builders that the daemon says it provides.
This is useful when you want to generate compatible derivations that can be
run with a daemon that potentially doesn't support builtin builders that the
daemon you're using to generate the derivations has.
I'm looking at this in particular because I want to use this in the data
service, since it provides substitutes for derivations, and since these can be
built on other machines, it's useful to control which builtin builders they
depend on.
* guix/store.scm (open-connection, port->connection): Accept
#:assume-available-builtin-builders and use this instead of
%built-in-builders.
Fixes: <https://issues.guix.gnu.org/67250>.
Change-Id: I45d58ab93b6d276d280552858fc81ebc2b58828a
---
guix/store.scm | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/guix/store.scm b/guix/store.scm
index 58ddaa8d15..0c734cdca7 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -571,7 +571,7 @@ (define* (connect-to-daemon uri #:key non-blocking?)
(define* (open-connection #:optional (uri (%daemon-socket-uri))
#:key port (reserve-space? #t) cpu-affinity
- non-blocking?)
+ non-blocking? assume-available-builtin-builders)
"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.
@@ -616,7 +616,9 @@ (define* (open-connection #:optional (uri (%daemon-socket-uri))
(when (>= (protocol-minor v) 11)
(write-int (if reserve-space? 1 0) port))
(letrec* ((built-in-builders
- (delay (%built-in-builders conn)))
+ (if assume-available-builtin-builders
+ (delay assume-available-builtin-builders)
+ (delay (%built-in-builders conn))))
(caches
(make-vector
(atomic-box-ref %store-connection-caches)
@@ -635,7 +637,8 @@ (define* (open-connection #:optional (uri (%daemon-socket-uri))
conn))))))
(define* (port->connection port
- #:key (version %protocol-version))
+ #:key (version %protocol-version)
+ assume-available-builtin-builders)
"Assimilate PORT, an input/output port, and return a connection to the
daemon, assuming the given protocol VERSION.
@@ -654,7 +657,9 @@ (define* (port->connection port
(make-vector
(atomic-box-ref %store-connection-caches)
vlist-null)
- (delay (%built-in-builders connection))))
+ (if assume-available-builtin-builders
+ (delay assume-available-builtin-builders)
+ (delay (%built-in-builders connection)))))
connection))
base-commit: 0846eaecd45783bf40e8dc67b0c16f71068524b7
--
2.41.0
This bug report was last modified 1 year and 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.