guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/09: remote: Really build things remotely when #:build-locally? is #fa


From: guix-commits
Subject: 02/09: remote: Really build things remotely when #:build-locally? is #false.
Date: Wed, 27 Oct 2021 18:44:51 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit b19250eec6f92308f237a09a43e8e3e2355345b9
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Oct 28 00:26:40 2021 +0200

    remote: Really build things remotely when #:build-locally? is #false.
    
    Fixes <https://issues.guix.gnu.org/46756>.
    Reported by pkill9 <pkill9@runbox.com>,
    Maxim Cournoyer <maxim.cournoyer@gmail.com>, and
    Katherine Cox-Buday <cox.katherine.e@gmail.com>.
    
    * guix/remote.scm (remote-eval): When BUILD-LOCALLY? is false, wrap
    'build-derivations' call in 'with-build-handler'.
---
 guix/remote.scm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/guix/remote.scm b/guix/remote.scm
index f6adb22..37e9827 100644
--- a/guix/remote.scm
+++ b/guix/remote.scm
@@ -146,6 +146,15 @@ remote store."
                                sources)))
           (mbegin %store-monad
             ((store-lift send-files) to-send remote #:recursive? #t)
-            (return (build-derivations remote inputs))
+
+            ;; Build handlers are not tied to a specific <store-connection>.
+            ;; If a handler is already installed, it might want to go ahead
+            ;; and build, but on the local <store-connection> instead of
+            ;; REMOTE.  To avoid that, install a build handler that does
+            ;; nothing.
+            (return (with-build-handler (lambda (continue . _)
+                                          (continue #t))
+                      (build-derivations remote inputs)))
+
             (return (close-connection remote))
             (return (%remote-eval lowered session become-command)))))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]