From: Vivien Kraus via Bug reports for GNU Guix <bug-guix@gnu.org>
To: Maxime Devos <maximedevos@telenet.be>, 50677@debbugs.gnu.org
Subject: bug#50677: [PATCH] Minetest basic_materials really depends on moreores
Date: Sun, 19 Sep 2021 20:59:54 +0200 [thread overview]
Message-ID: <bc57c9083a4daa38b2eee2d54971b7f8288349be.camel@planete-kraus.eu> (raw)
In-Reply-To: <67c326ff5fd285311dab48b03f646c28690fa376.camel@planete-kraus.eu>
[-- Attachment #1: Type: text/plain, Size: 907 bytes --]
Le dimanche 19 septembre 2021 à 20:54 +0200, Vivien Kraus a écrit :
> I forgot to say, I could not figure out why the package did not
> build,
> because the check phase in the minetest build system stops after the
> first error line of output, which only stated that there was a
> problem
> with init.lua. I had to disable the error line detection in the build
> system implementation to know it was a problem with this file. So, I
> figured out that what we need to do is gather all error lines, until
> either the server stops or starts despite the error, and fail only
> then.
>
> I prefer the exceptions API because it can handle multiple lines of
> errors while displaying them cleanly (unlike the error function, that
> displays an ugly ~a and prints the arguments on 1 line). But, it’s
> only
> for the "new" guile 3.0.
Sorry, the patterns were not in the correct order. This version is
better.
[-- Attachment #2: 0001-guix-minetest-build-system-Report-all-error-lines-be.patch --]
[-- Type: text/x-patch, Size: 2260 bytes --]
From 8daeded7ce3eeb02a1b239577fd26ffdf6a2b247 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Sun, 19 Sep 2021 20:03:10 +0200
Subject: [PATCH 1/3] guix: minetest-build-system: Report all error lines
before failing
* minetest-build-system.scm (check): Report all error lines before failing.
---
guix/build/minetest-build-system.scm | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/guix/build/minetest-build-system.scm b/guix/build/minetest-build-system.scm
index 477cc3d1d0..985859036c 100644
--- a/guix/build/minetest-build-system.scm
+++ b/guix/build/minetest-build-system.scm
@@ -23,6 +23,7 @@
#:use-module (ice-9 rdelim)
#:use-module (ice-9 receive)
#:use-module (ice-9 regex)
+ #:use-module (ice-9 exceptions)
#:use-module ((guix build gnu-build-system) #:prefix gnu:)
#:use-module ((guix build copy-build-system) #:prefix copy:)
#:export (%standard-phases
@@ -199,20 +200,25 @@ auth_backend = sqlite3
(define (stop? line)
(and (string? line)
(string-contains line "ACTION[Server]: singleplayer [127.0.0.1] joins game.")))
- (let loop ()
- (match (read-line port)
- ((? error? line)
- (error "minetest raised an error: ~a" line))
- ((? stop?)
+ (let loop ((errors '()))
+ (match `(,(read-line port) ,errors)
+ (((? error? line) errors)
+ (loop `(,line ,@errors)))
+ (((? stop?) ())
(kill pid SIGINT)
(close-port port)
(waitpid pid))
- ((? string? line)
+ (((? eof-object?) ())
+ (error "minetest didn't start"))
+ (((or (? stop?) (? eof-object?)) errors)
+ (raise-exception
+ (apply make-exception
+ (map make-exception-with-message
+ (reverse errors)))))
+ (((? string? line) errors)
(display line)
(newline)
- (loop))
- ((? eof-object?)
- (error "minetest didn't start"))))))))
+ (loop errors))))))))
(define %standard-phases
(modify-phases gnu:%standard-phases
--
2.33.0
next prev parent reply other threads:[~2021-09-19 19:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-19 15:23 bug#50677: [PATCH] Minetest basic_materials really depends on moreores Vivien Kraus via Bug reports for GNU Guix
2021-09-19 17:40 ` Maxime Devos
2021-09-19 18:54 ` Vivien Kraus via Bug reports for GNU Guix
2021-09-19 18:59 ` Vivien Kraus via Bug reports for GNU Guix [this message]
2021-09-19 19:18 ` Maxime Devos
2021-09-19 19:11 ` Maxime Devos
2021-09-19 21:05 ` Vivien Kraus via Bug reports for GNU Guix
2021-09-22 16:46 ` Vivien Kraus via Bug reports for GNU Guix
2021-09-22 17:41 ` Maxime Devos
2021-09-22 18:04 ` Vivien Kraus via Bug reports for GNU Guix
2021-09-22 18:15 ` Maxime Devos
2021-09-22 18:37 ` Vivien Kraus via Bug reports for GNU Guix
2021-09-22 18:43 ` Maxime Devos
2021-10-14 15:14 ` Vivien Kraus via Bug reports for GNU Guix
2021-10-15 20:18 ` Maxime Devos
2021-10-16 15:32 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix
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=bc57c9083a4daa38b2eee2d54971b7f8288349be.camel@planete-kraus.eu \
--to=bug-guix@gnu.org \
--cc=50677@debbugs.gnu.org \
--cc=maximedevos@telenet.be \
--cc=vivien@planete-kraus.eu \
/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).