aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-10-28 00:26:40 +0200
committerLudovic Courtès <ludo@gnu.org>2021-10-28 00:44:10 +0200
commitb19250eec6f92308f237a09a43e8e3e2355345b9 (patch)
tree1745678ea2a97df7525975a9ea14fd58d13e3e72
parent97d8d2ad02dda331fa9dbef4ac2b01ebfd3815b2 (diff)
downloadguix-b19250eec6f92308f237a09a43e8e3e2355345b9.tar.gz
guix-b19250eec6f92308f237a09a43e8e3e2355345b9.zip
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'.
-rw-r--r--guix/remote.scm11
1 files changed, 10 insertions, 1 deletions
diff --git a/guix/remote.scm b/guix/remote.scm
index f6adb22846..37e9827084 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)))))))