diff mbox series

[bug#67009,v2] build: minetest-build-system: Improve white space handling in mod name field.

Message ID 33c8f13583388ce1608d3deef57799041da8d8bc.1699526581.git.tristan@cott.am
State New
Headers show
Series [bug#67009,v2] build: minetest-build-system: Improve white space handling in mod name field. | expand

Commit Message

Tristan Cottam Nov. 9, 2023, 10:43 a.m. UTC
On Thursday, November 9th, 2023 at 7:06 AM, Liliana Marie Prikler <liliana.prikler@gmail.com> wrote:

> > The new regexp is missing a terminator ($). Should we add
> > [[:space:]]$ at the end?
> 
> Ahem, [[:space:]]*$ of course.

I didn't include [[:space:]]*$ in case someone decided to append a
comment to the same line. However, since Minetest doesn't officially
support comments in mod.conf, I think it's safe to include [[:space:]]*$
for clarity.

* guix/build/minetest-build-system.scm (name-regexp): Improve white
space handling.

Change-Id: I95f4c201724991a10efba5c859bfef99779ea495
---
 guix/build/minetest-build-system.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: b0bfddd7f937fcefdaeb1de4ccafd415c1df4122
diff mbox series

Patch

diff --git a/guix/build/minetest-build-system.scm b/guix/build/minetest-build-system.scm
index 4a7a87ab83..cfeca7d18f 100644
--- a/guix/build/minetest-build-system.scm
+++ b/guix/build/minetest-build-system.scm
@@ -126,7 +126,7 @@  (define* (minimise-png #:key inputs native-inputs #:allow-other-keys)
                    (/ total-old-size (expt 1024 2))
                    (/ total-new-size (expt 1024 2)))))))
 
-(define name-regexp (make-regexp "^name[ ]*=(.+)$"))
+(define name-regexp (make-regexp "^name[[:space:]]*=[[:space:]]*([[:graph:]]+)[[:space:]]*$"))
 
 (define* (read-mod-name mod.conf #:optional not-found)
   "Read the name of a mod from MOD.CONF.  If MOD.CONF