unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Tristan Cottam via Guix-patches via <guix-patches@gnu.org>
To: 67009@debbugs.gnu.org
Cc: "Tristan Cottam" <tristan@cott.am>,
	"Liliana Marie Prikler" <liliana.prikler@gmail.com>,
	宋文武 <iyzsong@envs.net>
Subject: [bug#67009] [PATCH v2] build: minetest-build-system: Improve white space handling in mod name field.
Date: Thu,  9 Nov 2023 11:43:01 +0100	[thread overview]
Message-ID: <33c8f13583388ce1608d3deef57799041da8d8bc.1699526581.git.tristan@cott.am> (raw)
In-Reply-To: <034f56289398fd3198b05b0a5a9b0147d64e92ba.1699493581.git.tristan@cott.am>

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

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

base-commit: b0bfddd7f937fcefdaeb1de4ccafd415c1df4122
-- 
2.41.0





  parent reply	other threads:[~2023-11-09 14:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-09  1:33 [bug#67009] [PATCH] build: minetest-build-system: Improve white space handling in mod name field Tristan Cottam via Guix-patches via
2023-11-09  6:06 ` Liliana Marie Prikler
2023-11-09  6:06   ` Liliana Marie Prikler
2023-11-09 10:43 ` Tristan Cottam via Guix-patches via [this message]
2023-11-09 11:19   ` [bug#67009] [PATCH v2] " Liliana Marie Prikler
2023-11-09 12:18 ` [bug#67009] [PATCH v3] " Tristan Cottam via Guix-patches via
2023-11-09 13:06   ` Liliana Marie Prikler
     [not found]     ` <Mw3bYJJXHCFsjOsi55NNrXMbnVGn8S8dqIzUwDUcpTaOrojg_PH0ZA6cyFHFdvg3DYyD7xeC2qYfwRAMpIGH993rnCvDDdr9-Q0yGtE-r3c=@cott.am>
2023-11-10  0:59       ` [bug#67009] [PATCH] " Tristan Cottam via Guix-patches via
2023-11-10 17:54         ` Liliana Marie Prikler
2023-11-11  1:05 ` [bug#67009] [PATCH v4] " Tristan Cottam via Guix-patches via
2023-11-11  6:13   ` bug#67009: " Liliana Marie Prikler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=33c8f13583388ce1608d3deef57799041da8d8bc.1699526581.git.tristan@cott.am \
    --to=guix-patches@gnu.org \
    --cc=67009@debbugs.gnu.org \
    --cc=iyzsong@envs.net \
    --cc=liliana.prikler@gmail.com \
    --cc=tristan@cott.am \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).