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'.
This commit is contained in:
Ludovic Courtès 2021-10-28 00:26:40 +02:00
parent 97d8d2ad02
commit b19250eec6
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5

@ -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)))))))