me
/
guix
Archived
1
0
Fork 0

build-system/gnu: Fix patch-dot-desktop-files regexp.

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 <me@tobias.gr>
master
Brendan Tildesley 2021-04-09 21:43:54 +10:00 committed by Tobias Geerinckx-Rice
parent 77759234a3
commit 685110045c
No known key found for this signature in database
GPG Key ID: 0DB0FF884F556D79
1 changed files with 2 additions and 2 deletions

View File

@ -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))