diff mbox series

[bug#42146,v3,3/3] build: bootstrap-configure: Allow lack of matches in substitute.

Message ID 0d8764ba1b635d49c07cc1d47f3dcc620bbf482d.1697763444.git.maxim.cournoyer@gmail.com
State New
Headers show
Series [bug#42146,v3,1/3] build: Relocate <regexp*> record and associated procedures here. | expand

Commit Message

Maxim Cournoyer Oct. 20, 2023, 12:57 a.m. UTC
From: Jakub Kądziołka <kuba@kadziolka.net>

Matches are not required here, as not every file will use every
variable.

* guix/build/gnu-bootstrap.scm (bootstrap-configure): Pass
  #:require-matches? #f to substitute*.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Change-Id: I7eee433a3af5fa310b3f2e8b8b58ac9befb4b56a
---
 guix/build/gnu-bootstrap.scm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/guix/build/gnu-bootstrap.scm b/guix/build/gnu-bootstrap.scm
index b4257a3717..b097f410ad 100644
--- a/guix/build/gnu-bootstrap.scm
+++ b/guix/build/gnu-bootstrap.scm
@@ -1,5 +1,6 @@ 
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2020, 2022 Timothy Sample <samplet@ngyro.com>
+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -52,7 +53,8 @@  (define (bootstrap-configure name version modules scripts)
                     (copy-file template target)
                     (substitute* target
                       (("@PACKAGE_NAME@") name)
-                      (("@VERSION@") version))))
+                      (("@VERSION@") version)
+                      #:require-matches? #f)))
                 (append-map (lambda (dir) (find-files dir "\\.in$"))
                             modules))
       (for-each (lambda (template)
@@ -62,12 +64,12 @@  (define (bootstrap-configure name version modules scripts)
                     (substitute* target
                       (("@GUILE@") guile)
                       (("@MODDIR@") moddir)
-                      (("@GODIR@") godir))
+                      (("@GODIR@") godir)
+                      #:require-matches? #f)
                     (chmod target #o755)))
                 (find-files scripts
                             (lambda (fn st)
-                              (string-suffix? ".in" fn))))
-      #t)))
+                              (string-suffix? ".in" fn)))))))
 
 (define (bootstrap-build modules)
   "Create a procedure that builds an early bootstrap package.  The