GNU bug report logs -
#67009
[PATCH] build: minetest-build-system: Improve white space handling in mod name field.
Previous Next
Reported by: Tristan Cottam <tristan <at> cott.am>
Date: Thu, 9 Nov 2023 05:43:01 UTC
Severity: normal
Tags: patch
Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Am Donnerstag, dem 09.11.2023 um 11:43 +0100 schrieb Tristan Cottam:
> On Thursday, November 9th, 2023 at 7:06 AM, Liliana Marie Prikler
> <liliana.prikler <at> 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.
Note: comments that aren't for the commit itself should go below the
dashed (---) line.
> * 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(-)
>
> 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:]]*$"))
LGTM, but I'd do a line break + indentation before make-regexp.
Applied locally with exactly that change; will push unless there's
other comments in the next few days.
Cheers
This bug report was last modified 1 year and 189 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.