From 0099dbafd40bf4d71884ce2d709fef1edac18f53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 26 Aug 2026 16:48:19 +0200 Subject: =?UTF-8?q?ui:=20Modify=20=E2=80=98spawn=E2=80=99=20only=20when=20?= =?UTF-8?q?it=20is=20defined.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a regression introduced in a6094158aa4fb8ec217e41c000264ba6e2095a3b whereby upgrading from an old Guix revision, running on Guile version earlier than 3.0.9, would break while building ‘module-import-compiled.drv’. * guix/ui.scm : Set ‘spawn’ only when it’s defined. Reported-by: Yelninei Reported-by: Danny Milosavljevic Fixes: guix/guix#9852 Fixes: guix/guix#10809 Signed-off-by: Ludovic Courtès Merges: #10830 --- guix/ui.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/guix/ui.scm b/guix/ui.scm index dafc04b20f7..e2c9a568eb9 100644 --- a/guix/ui.scm +++ b/guix/ui.scm @@ -750,8 +750,11 @@ FILE." (set! mkdir (error-reporting-wrapper mkdir (directory . args) directory)) -(set! spawn - (error-reporting-wrapper spawn (filename . args) filename)) +;; 'spawn' appeared in Guile 3.0.9. Address the situation where updating from +;; an old Guix running on an older version of Guile lacking 'spawn'. +(when (module-defined? the-scm-module 'spawn) + (set! spawn + (error-reporting-wrapper spawn (filename . args) filename))) (define (make-regexp* regexp . flags) "Like 'make-regexp' but error out if REGEXP is invalid, reporting the error -- cgit v1.2.3