GNU bug report logs - #67009
[PATCH] build: minetest-build-system: Improve white space handling in mod name field.

Previous Next

Package: guix-patches;

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


Message #8 received at 67009 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Tristan Cottam <tristan <at> cott.am>, 67009 <at> debbugs.gnu.org
Cc: 宋文武 <iyzsong <at> envs.net>
Subject: Re: [bug#67009] [PATCH] build: minetest-build-system: Improve white
 space handling in mod name field.
Date: Thu, 09 Nov 2023 07:06:01 +0100
Am Donnerstag, dem 09.11.2023 um 02:33 +0100 schrieb Tristan Cottam:
> I'm currently developing a Minetest service, with its configuration
> including a field specifying the list of mod packages to install and
> enable.
> 
> However, certain mods' configuration, beind developed on Windows,
> have a
> trailing carriage return before each newline, which is included in
> the
> Guix store mod directory base name. Such mods can't be
> programmatically
> loaded by a Minetest world, since trailing whitespace is ignored by
> Minetest's world configuration parser, leading to the wrong mod path
> being used.
> 
> This patch fixes certain Minetest mods being stored with a
> terminating
> carriage return in their directory base name.
> 
> * 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..8233d56aca 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:]]+)"))
The new regexp is missing a terminator ($).  Should we add [[:space:]]$
at the end?

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.