branch: main
commit 20c6bcdd293f1c74867b10ec465f8aaca91ef93e
Author: Ludovic Courtès <[email protected]>
AuthorDate: Fri Mar 21 16:33:48 2025 +0100

    store: Remove ‘with-store/non-blocking’, now provided by Guix.
    
    * src/cuirass/store.scm (with-store/non-blocking): Remove.
    * src/cuirass/scripts/remote-server.scm,
    src/cuirass/scripts/remote-worker.scm: Take it from (guix store) instead.
---
 src/cuirass/scripts/remote-server.scm |  1 +
 src/cuirass/scripts/remote-worker.scm |  4 ++--
 src/cuirass/store.scm                 | 12 +-----------
 3 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/src/cuirass/scripts/remote-server.scm 
b/src/cuirass/scripts/remote-server.scm
index ae45232..5e6b125 100644
--- a/src/cuirass/scripts/remote-server.scm
+++ b/src/cuirass/scripts/remote-server.scm
@@ -38,6 +38,7 @@
   #:autoload   (guix serialization) (nar-error?)
   #:use-module ((guix store)
                 #:select (current-build-output-port
+                          with-store/non-blocking
                           ensure-path
                           store-protocol-error?
                           store-protocol-error-message))
diff --git a/src/cuirass/scripts/remote-worker.scm 
b/src/cuirass/scripts/remote-worker.scm
index 67edfb2..f748d10 100644
--- a/src/cuirass/scripts/remote-worker.scm
+++ b/src/cuirass/scripts/remote-worker.scm
@@ -22,7 +22,6 @@
   #:use-module (fibers channels)
   #:autoload   (cuirass base) (spawn-gc-root-cleaner)
   #:autoload   (cuirass store) (ensure-path/retry
-                                with-store/non-blocking
                                 build-derivations&
                                 register-gc-roots
                                 %gc-root-directory)
@@ -49,7 +48,8 @@
                           valid-path?
                           substitutable-path
                           build-things
-                          with-store))
+                          with-store
+                          with-store/non-blocking))
   #:use-module (guix ui)
   #:use-module (guix utils)
   #:use-module (guix build syscalls)
diff --git a/src/cuirass/store.scm b/src/cuirass/store.scm
index a5a770e..43e18a9 100644
--- a/src/cuirass/store.scm
+++ b/src/cuirass/store.scm
@@ -32,8 +32,7 @@
   #:use-module (ice-9 threads)
   #:use-module ((fibers) #:select (sleep))
   #:autoload   (fibers channels) (make-channel put-message get-message)
-  #:export (with-store/non-blocking
-            process-build-log
+  #:export (process-build-log
             ensure-path/retry
             build-derivations&
 
@@ -122,15 +121,6 @@ O_NONBLOCK."
      (blocking-port port))
     (_ #f)))
 
-(define-syntax-rule (with-store/non-blocking store exp ...)
-  "Like 'with-store', bind STORE to a connection to the store, but ensure that
-said connection is non-blocking (O_NONBLOCK).  Evaluate EXP... in that
-context."
-  (with-store store
-    (ensure-non-blocking-store-connection store)
-    (let ()
-      exp ...)))
-
 (define (process-build-log port proc seed)
   "Read from PORT the build log, calling PROC for each build event like 'fold'
 does.  Return the result of the last call to PROC."

Reply via email to