guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 0099dbafd40bf4d71884ce2d709fef1edac18f53
Author: Ludovic Courtès <[email protected]>
AuthorDate: Wed Aug 26 16:48:19 2026 +0200

    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 <[email protected]>
    Reported-by: Danny Milosavljevic <[email protected]>
    Fixes: guix/guix#9852
    Fixes: guix/guix#10809
    Signed-off-by: Ludovic Courtès <[email protected]>
    Merges: #10830
---
 guix/ui.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/guix/ui.scm b/guix/ui.scm
index dafc04b20f..e2c9a568eb 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

Reply via email to