GNU bug report logs -
#42146
[PATCH core-updates 1/?] build: substitute: Don't fail silently.
Previous Next
Full log
View this message in rfc822 format
* 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 <at> gnu.org>
;;; Copyright © 2018 Mark H Weaver <mhw <at> netris.org>
;;; Copyright © 2020 Brendan Tildesley <mail <at> brendan.scot>
+;;; Copyright © 2020 Jakub Kądziołka <kuba <at> 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
This bug report was last modified 1 year and 233 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.