summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2026-08-26 16:48:19 +0200
committerLudovic Courtès <ludo@gnu.org>2026-09-02 12:16:02 +0200
commit0099dbafd40bf4d71884ce2d709fef1edac18f53 (patch)
tree9b39ed169d75a49d4bb5a403ac2fc8b23e4cd4d7
parentbe08b720825a09937e15a64c4c3ff81f56ddbe1f (diff)
ui: Modify ‘spawn’ only when it is defined.
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 <top level>: Set ‘spawn’ only when it’s defined. Reported-by: Yelninei <yelninei@tutamail.com> Reported-by: Danny Milosavljevic <dannym@friendly-machines.com> Fixes: guix/guix#9852 Fixes: guix/guix#10809 Signed-off-by: Ludovic Courtès <ludo@gnu.org> Merges: #10830
-rw-r--r--guix/ui.scm7
1 files 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."
750(set! mkdir 750(set! mkdir
751 (error-reporting-wrapper mkdir (directory . args) directory)) 751 (error-reporting-wrapper mkdir (directory . args) directory))
752 752
753(set! spawn 753;; 'spawn' appeared in Guile 3.0.9. Address the situation where updating from
754 (error-reporting-wrapper spawn (filename . args) filename)) 754;; an old Guix running on an older version of Guile lacking 'spawn'.
755(when (module-defined? the-scm-module 'spawn)
756 (set! spawn
757 (error-reporting-wrapper spawn (filename . args) filename)))
755 758
756(define (make-regexp* regexp . flags) 759(define (make-regexp* regexp . flags)
757 "Like 'make-regexp' but error out if REGEXP is invalid, reporting the error 760 "Like 'make-regexp' but error out if REGEXP is invalid, reporting the error