From 685110045c04a60bf18163aab1c230f944c871c9 Mon Sep 17 00:00:00 2001 From: Brendan Tildesley Date: Fri, 9 Apr 2021 21:43:54 +1000 Subject: build-system/gnu: Fix patch-dot-desktop-files regexp. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When patching .desktop files, Exec= values beginning with "/", (or spaces or newline characters) will result in BINARY matching the empty string. Changing "*", meaning 0 or more, to "+", meaning 1 or more, ensures it will match a basename of at least length 1, or nothing. * guix/build/gnu-build-system.scm (patch-dot-desktop-files): Substitute ‘+’ for ‘*’. Signed-off-by: Tobias Geerinckx-Rice --- guix/build/gnu-build-system.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guix/build/gnu-build-system.scm') diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index d84411c090..b5b4468a45 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -727,9 +727,9 @@ which cannot be found~%" ;; UTF-8-encoded. (with-fluids ((%default-port-encoding "UTF-8")) (substitute* files - (("^Exec=([^/[:blank:]\r\n]*)(.*)$" _ binary rest) + (("^Exec=([^/[:blank:]\r\n]+)(.*)$" _ binary rest) (string-append "Exec=" (which binary) rest)) - (("^TryExec=([^/[:blank:]\r\n]*)(.*)$" _ binary rest) + (("^TryExec=([^/[:blank:]\r\n]+)(.*)$" _ binary rest) (string-append "TryExec=" (which binary) rest))))))))) outputs)) -- cgit v1.2.3