unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jakub Kądziołka" <kuba@kadziolka.net>
To: 42146@debbugs.gnu.org
Subject: [bug#42146] [PATCH 5/?] build-system/gnu: Allow lack of matches in substitution phases.
Date: Wed,  1 Jul 2020 02:42:42 +0200	[thread overview]
Message-ID: <20200701004242.18245-1-kuba@kadziolka.net> (raw)
In-Reply-To: <20200630220913.14665-1-kuba@kadziolka.net>

* guix/build/utils.scm (patch-makefile-SHELL, patch-/usr/bin/file),
  guix/build/gnu-build-system.scm (patch-dot-desktop-files):
  Allow lack of matches in substitute*.
---
 guix/build/gnu-build-system.scm | 3 ++-
 guix/build/utils.scm            | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index 2e7dff2034..4b96761233 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2020 Brendan Tildesley <mail@brendan.scot>
+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -724,7 +725,7 @@ which cannot be found~%"
                      ;; '.desktop' files contain translations and are always
                      ;; UTF-8-encoded.
                      (with-fluids ((%default-port-encoding "UTF-8"))
-                       (substitute* files
+                       (substitute* files #:require-matches? #f
                          (("^Exec=([^/[:blank:]\r\n]*)(.*)$" _ binary rest)
                           (string-append "Exec=" (which binary) rest))
                          (("^TryExec=([^/[:blank:]\r\n]*)(.*)$" _ binary rest)
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 1bfb774c60..a8218a7743 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -1005,7 +1005,7 @@ When KEEP-MTIME? is true, the atime/mtime of FILE are kept unchanged."
   (let ((st (stat file)))
     ;; Consider FILE is using an 8-bit encoding to avoid errors.
     (with-fluids ((%default-port-encoding #f))
-      (substitute* file
+      (substitute* file #:require-matches? #f
         (("^ *SHELL[[:blank:]]*:?=[[:blank:]]*([[:graph:]]*/)([[:graph:]]+)(.*)$"
           _ dir shell args)
          (let* ((old (string-append dir shell))
@@ -1033,7 +1033,7 @@ no replacement 'file' command, doing nothing~%")
       (let ((st (stat file)))
         ;; Consider FILE is using an 8-bit encoding to avoid errors.
         (with-fluids ((%default-port-encoding #f))
-          (substitute* file
+          (substitute* file #:require-matches? #f
             (("/usr/bin/file")
              (begin
                (format (current-error-port)
-- 
2.26.2





  parent reply	other threads:[~2020-07-01  0:43 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30 22:09 [bug#42146] [PATCH core-updates 1/?] build: substitute: Don't fail silently Jakub Kądziołka
2020-06-30 22:11 ` [bug#42146] [PATCH 2/?] build: bootstrap-configure: Allow lack of matches in substitute Jakub Kądziołka
2020-06-30 22:11 ` [bug#42146] [PATCH 3/?] gnu: commencement: Build fix for %bootstrap-mes-rewired Jakub Kądziołka
     [not found] ` <handler.42146.B.159355497531278.ack@debbugs.gnu.org>
2020-06-30 22:50   ` [bug#42146] [PATCH core-updates 1/?] build: substitute: Don't fail silently Jakub Kądziołka
2023-10-19 13:14     ` Maxim Cournoyer
2020-07-01  0:42 ` [bug#42146] [PATCH 4/?] gnu: mes-boot: Use verbosity settings integrated into buildsystem Jakub Kądziołka
2020-07-01  0:42 ` Jakub Kądziołka [this message]
2020-07-01  9:55 ` [bug#42146] [PATCH 6/6] gnu: glibc-mesboot0: Fixup the fixup-configure phase Jakub Kądziołka
2023-10-19 20:33 ` [bug#42146] [PATCH 1/3] build: Relocate <regexp*> record and associated procedures here Maxim Cournoyer
2023-10-19 20:33   ` [bug#42146] [PATCH 2/3] build: substitute: Error when no substitutions were done Maxim Cournoyer
2023-10-19 20:49     ` [bug#42146] [PATCH core-updates 1/?] build: substitute: Don't fail silently Ludovic Courtès
2023-10-20 18:50       ` Bruno Victal
2023-10-20 21:11         ` Maxim Cournoyer
2023-10-19 20:33   ` [bug#42146] [PATCH 3/3] build: bootstrap-configure: Allow lack of matches in substitute Maxim Cournoyer
2023-10-19 20:51     ` [bug#42146] [PATCH core-updates 1/?] build: substitute: Don't fail silently Ludovic Courtès
2023-10-19 20:40   ` Ludovic Courtès
2023-10-19 23:54     ` Maxim Cournoyer
2023-10-23  8:42       ` Ludovic Courtès
2023-10-23 15:05         ` Maxim Cournoyer
2023-10-20 15:11     ` Simon Tournier
2023-10-20 15:39       ` Maxim Cournoyer
2023-10-20  0:57 ` [bug#42146] [PATCH v3 1/3] build: Relocate <regexp*> record and associated procedures here Maxim Cournoyer
2023-10-20  0:57   ` [bug#42146] [PATCH v3 2/3] build: substitute: Error when no substitutions were done Maxim Cournoyer
2023-10-23  8:48     ` [bug#42146] [PATCH core-updates 1/?] build: substitute: Don't fail silently Ludovic Courtès
2023-10-23 16:25       ` Maxim Cournoyer
2023-10-23  8:51     ` Ludovic Courtès
2023-10-20  0:57   ` [bug#42146] [PATCH v3 3/3] build: bootstrap-configure: Allow lack of matches in substitute Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200701004242.18245-1-kuba@kadziolka.net \
    --to=kuba@kadziolka.net \
    --cc=42146@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).