[PATCH] Minetest basic_materials really depends on moreores

DoneSubmitted by Vivien Kraus.
Details
3 participants
  • Maxime Devos
  • Tobias Geerinckx-Rice
  • Vivien Kraus
Owner
unassigned
Severity
normal
V
V
Vivien Kraus wrote on 19 Sep 2021 17:23
(address . bug-guix@gnu.org)
47d31be5bfc24646981f2f71942fedd89c556405.camel@planete-kraus.eu
Dear guix,

basic_materials actually requires moreores, otherwise some craft
recipes are just not possible. For instance,
basic_materials:silver_wire can only be crafted with
moreores:silver_ingot. This silver wire is actually needed for basic
technic machines, such as the LV compressor.

So, let’s add minetest-moreores!

Vivien
From 29ad4ee950fae906c90c512dedde7b5198f09f63 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Sun, 19 Sep 2021 17:00:45 +0200
Subject: [PATCH 2/2] gnu: minetest-basic-materials: Depend on
minetest-moreores.

* minetest.scm (minetest-basic-materials): Add minetest-moreores as a propagated input.
---
gnu/packages/minetest.scm | 4 ++++
1 file changed, 4 insertions(+)

Toggle diff (17 lines)
diff --git a/gnu/packages/minetest.scm b/gnu/packages/minetest.scm
index 49e5a00fd2..9bcd470634 100644
--- a/gnu/packages/minetest.scm
+++ b/gnu/packages/minetest.scm
@@ -230,6 +230,10 @@ numeric identifier TOPIC-ID on the official Minetest forums."
         (base32 "0v6l3lrjgshy4sccjhfhmfxc3gk0cdy73qb02i9wd2vw506v5asx"))
        (file-name (git-file-name name version))))
     (build-system minetest-mod-build-system)
+    (propagated-inputs
+     ;; basic_materials:silver_wire cannot be crafted without
+     ;; moreores:silver_ingot.
+     `(("minetest-moreores" ,minetest-moreores)))
     (home-page (minetest-topic 21000))
     (synopsis "Some \"basic\" materials and items for other Minetest mods to use")
     (description
-- 
2.33.0
From 7beb382034560802e189a6494b6de40818cc1755 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Sun, 19 Sep 2021 16:58:53 +0200
Subject: [PATCH 1/2] gnu: Add minetest-moreores.

* gnu/packages/minetest.scm (minetest-moreores): New variable.
---
gnu/packages/minetest.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/minetest.scm b/gnu/packages/minetest.scm
index fd1439d4d2..49e5a00fd2 100644
--- a/gnu/packages/minetest.scm
+++ b/gnu/packages/minetest.scm
@@ -187,6 +187,34 @@ numeric identifier TOPIC-ID on the official Minetest forums."
   (string-append "https://forum.minetest.net/viewtopic.php?t="
                  (number->string topic-id)))
 
+(define-public minetest-moreores
+  (package
+    (name "minetest-moreores")
+    (version "v2.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/minetest-mods/moreores")
+             (commit "0b6f669df4c9b7771c03e0e6ba8effb471cdfcae")))
+       (sha256 (base32 "1chfqbc6bb27aacjc67j5l5wcdvmcsvk2rfmangipd7nwini3y34"))
+       (file-name (git-file-name name version))))
+    (build-system minetest-mod-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'install-_config.txt
+           (lambda* (#:key inputs #:allow-other-keys)
+             (copy-file
+              "_config.txt"
+              (string-append %output "/share/minetest/mods/moreores/_config.txt"))
+             #t)))))
+    (home-page (minetest-topic 549))
+    (synopsis "Adds new ore types")
+    (description "More ores for Minetest.")
+    (license license:zlib)
+    (properties `((upstream-name . "Calinou/moreores")))))
+
 (define-public minetest-basic-materials
   (package
     (name "minetest-basic-materials")
-- 
2.33.0
M
M
Maxime Devos wrote on 19 Sep 2021 19:40
b1ca1440fa78bb64acc4f8a6bbd622bc9c396e82.camel@telenet.be
Vivien Kraus via Bug reports for GNU Guix schreef op zo 19-09-2021 om 17:23 [+0200]:
Toggle quote (10 lines)
> Dear guix,
>
> basic_materials actually requires moreores, otherwise some craft
> recipes are just not possible. For instance,
> basic_materials:silver_wire can only be crafted with
> moreores:silver_ingot. This silver wire is actually needed for basic
> technic machines, such as the LV compressor.
>
> So, let’s add minetest-moreores!

In creative mode, crafting isn't necessary, you can give yourself all
the items and blocks you want. OTOH, letting the crafting recipes
work (at least when all the mods are enabled for the world,
they seem to be disabled by default) seems rather important for ‘survival’
players, so adding a propagated-input doesn't seem unreasonable here.

Toggle quote (2 lines)
> + (version "v2.1.0")

Versions in guix don't use any leading "v" prefix. If I'm not mistaken,
Ludovic applied the patched to remove them automatically.

Toggle quote (2 lines)
> + (lambda* (#:key inputs #:allow-other-keys)

inputs is unused, so you can write '(lambda _' here instead (somewhat simpler)

Toggle quote (2 lines)
> /share/minetest/mods/moreores/_config.txt

Is this "_config.txt" file moreores-specific? If not, maybe minetest-mod-build-system
could be modified to install these files by default?

Greetings,
Maxime
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYUd2IhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7j4SAP9EAwLGaNBJSvfDlG8TUFRuZrsv
EtEkKvO+Sq9aeg3EQAEAp0vPPXmAOObknCHnb6W/EATuqyhIetTMd8pZBoiKQw0=
=BZ31
-----END PGP SIGNATURE-----


V
V
Vivien Kraus wrote on 19 Sep 2021 20:54
67c326ff5fd285311dab48b03f646c28690fa376.camel@planete-kraus.eu
Hello,

Le dimanche 19 septembre 2021 à 19:40 +0200, Maxime Devos a écrit :
Toggle quote (5 lines)
> > + (version "v2.1.0")
>
> Versions in guix don't use any leading "v" prefix. If I'm not
> mistaken,
> Ludovic applied the patched to remove them automatically.
Right, I just had not guix pulled lately, I confirm it works with a
more recent guix version.

Toggle quote (5 lines)
> > /share/minetest/mods/moreores/_config.txt
>
> Is this "_config.txt" file moreores-specific? If not, maybe
> minetest-mod-build-system
> could be modified to install these files by default?
I don’t know, but a quick web search for:

minetest mod "_config.txt"

gave me 2 hits, one for moreores, and one for moreblocks, by the same
author. I supposed it is an author preference.

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.

What do you think?

Vivien
From eeb9c3a599aa07b36bd8b8ca8000ad6ef594dd99 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Sun, 19 Sep 2021 17:00:45 +0200
Subject: [PATCH 3/3] gnu: minetest-basic-materials: Depend on
minetest-moreores.

* minetest.scm (minetest-basic-materials): Add minetest-moreores as a propagated input.
---
gnu/packages/minetest.scm | 4 ++++
1 file changed, 4 insertions(+)

Toggle diff (17 lines)
diff --git a/gnu/packages/minetest.scm b/gnu/packages/minetest.scm
index de1415097d..666f78c6ba 100644
--- a/gnu/packages/minetest.scm
+++ b/gnu/packages/minetest.scm
@@ -230,6 +230,10 @@ numeric identifier TOPIC-ID on the official Minetest forums."
         (base32 "0v6l3lrjgshy4sccjhfhmfxc3gk0cdy73qb02i9wd2vw506v5asx"))
        (file-name (git-file-name name version))))
     (build-system minetest-mod-build-system)
+    (propagated-inputs
+     ;; basic_materials:silver_wire cannot be crafted without
+     ;; moreores:silver_ingot.
+     `(("minetest-moreores" ,minetest-moreores)))
     (home-page (minetest-topic 21000))
     (synopsis "Some \"basic\" materials and items for other Minetest mods to use")
     (description
-- 
2.33.0
From d19f2812f8b77fc2896ff1b8b42b9d99efb42a0c Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Sun, 19 Sep 2021 16:58:53 +0200
Subject: [PATCH 2/3] gnu: Add minetest-moreores.

* gnu/packages/minetest.scm (minetest-moreores): New variable.
---
gnu/packages/minetest.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/minetest.scm b/gnu/packages/minetest.scm
index fd1439d4d2..de1415097d 100644
--- a/gnu/packages/minetest.scm
+++ b/gnu/packages/minetest.scm
@@ -187,6 +187,34 @@ numeric identifier TOPIC-ID on the official Minetest forums."
   (string-append "https://forum.minetest.net/viewtopic.php?t="
                  (number->string topic-id)))
 
+(define-public minetest-moreores
+  (package
+    (name "minetest-moreores")
+    (version "2.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/minetest-mods/moreores")
+             (commit "0b6f669df4c9b7771c03e0e6ba8effb471cdfcae")))
+       (sha256 (base32 "1chfqbc6bb27aacjc67j5l5wcdvmcsvk2rfmangipd7nwini3y34"))
+       (file-name (git-file-name name version))))
+    (build-system minetest-mod-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'install-_config.txt
+           (lambda* _
+             (copy-file
+              "_config.txt"
+              (string-append %output "/share/minetest/mods/moreores/_config.txt"))
+             #t)))))
+    (home-page (minetest-topic 549))
+    (synopsis "Adds new ore types")
+    (description "More ores for Minetest.")
+    (license license:zlib)
+    (properties `((upstream-name . "Calinou/moreores")))))
+
 (define-public minetest-basic-materials
   (package
     (name "minetest-basic-materials")
-- 
2.33.0
From 48095aa751cef4202e280c2d0ffa35a8d1cb5c12 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 | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)

Toggle diff (51 lines)
diff --git a/guix/build/minetest-build-system.scm b/guix/build/minetest-build-system.scm
index 477cc3d1d0..badc45112b 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)))
+            (((? string? line) errors)
+             (display line)
+             (newline)
+             (loop errors))
+            (((? stop?) ())
              (kill pid SIGINT)
              (close-port port)
              (waitpid pid))
-            ((? string? line)
-             (display line)
-             (newline)
-             (loop))
-            ((? eof-object?)
-             (error "minetest didn't start"))))))))
+            (((? eof-object?) ())
+             (error "minetest didn't start"))
+            (((or (? stop?) (? eof-object?)) errors)
+             (raise-exception
+              (apply make-exception
+                     (map make-exception-with-message
+                          (reverse errors)))))))))))
 
 (define %standard-phases
   (modify-phases gnu:%standard-phases
-- 
2.33.0
V
V
Vivien Kraus wrote on 19 Sep 2021 20:59
bc57c9083a4daa38b2eee2d54971b7f8288349be.camel@planete-kraus.eu
Le dimanche 19 septembre 2021 à 20:54 +0200, Vivien Kraus a écrit :
Toggle quote (16 lines)
> 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.
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(-)

Toggle diff (49 lines)
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
M
M
Maxime Devos wrote on 19 Sep 2021 21:11
9d9f86773809358187afbe5c7052d09f3d4d1052.camel@telenet.be
Vivien Kraus schreef op zo 19-09-2021 om 20:54 [+0200]:
Toggle quote (23 lines)
> Hello,
>
> Le dimanche 19 septembre 2021 à 19:40 +0200, Maxime Devos a écrit :
> > > + (version "v2.1.0")
> >
> > Versions in guix don't use any leading "v" prefix. If I'm not
> > mistaken,
> > Ludovic applied the patched to remove them automatically.
> Right, I just had not guix pulled lately, I confirm it works with a
> more recent guix version.
>
> > > /share/minetest/mods/moreores/_config.txt
> >
> > Is this "_config.txt" file moreores-specific? If not, maybe
> > minetest-mod-build-system
> > could be modified to install these files by default?
> I don’t know, but a quick web search for:
>
> minetest mod "_config.txt"
>
> gave me 2 hits, one for moreores, and one for moreblocks, by the same
> author. I supposed it is an author preference.


"settingstypes.txt" is already in mod-install-plan (guix build minetest-build-system).
I suppose you can add "config.txt" and "_config.txt" as well.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYUeLfRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qqUAP9Zd70ZzjUL8Lg+dK+K1t8rxUtu
rhbjc7YXdrmkZyHcnAEA8X7xjoapPuFHSsnzZrGyHn6XkC9uK5ceUODsDL+ZEAo=
=l3O+
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 19 Sep 2021 21:18
e4a178c9b950406d83700276ba172d2f0b598a3f.camel@telenet.be
Vivien Kraus schreef op zo 19-09-2021 om 20:59 [+0200]:
Toggle quote (18 lines)
> 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.

This modified error reporting seems reasonable to me, but I haven't tested
it. It only being for the "new" guile 3.0 is probably fine. IIUC, within
the build environment, guile 3.0.SOMETHING is used, and configure.ac
only checks for guile 3.0:

dnl Search for 'guile' and 'guild'. This macro defines
dnl 'GUILE_EFFECTIVE_VERSION'.
GUILE_PKG([3.0])
GUILE_PROGS
if test "x$GUILD" = "x"; then
AC_MSG_ERROR(['guild' binary not found; please check your Guile installation.])
fi

Greetings,
Maxime
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYUeNChccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7hm+AP44J+gaa9vMdjdsOiSXvYKC7Tq6
E4ssiaftm4tK8pAB9gD+NsxHDhhT+tRBSBPiWW0lkn+uq6fZVR6hWUYqroUgOgw=
=6F4J
-----END PGP SIGNATURE-----


V
V
Vivien Kraus wrote on 19 Sep 2021 23:05
9f206acf24c7fc265102712912d3d0e336b54fc7.camel@planete-kraus.eu
Le dimanche 19 septembre 2021 à 21:11 +0200, Maxime Devos a écrit :
Toggle quote (12 lines)
> I found a use of "config.txt" (
> https://forum.minetest.net/viewtopic.php?t=2290),
> "settingstypes.txt" (
> https://github.com/NathanSalapat/more_fire/blob/master/settingtypes.txt
> )
> and another "_config.txt" (
> https://forum.minetest.net/viewtopic.php?t=25275).
>
> "settingstypes.txt" is already in mod-install-plan (guix build
> minetest-build-system).
> I suppose you can add "config.txt" and "_config.txt" as well.

OK.

Toggle quote (31 lines)
> Vivien Kraus schreef op zo 19-09-2021 om 20:59 [+0200]:
> > 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.
>
> This modified error reporting seems reasonable to me, but I haven't
> tested
> it.

I link my output without 0001 (fail at first error line) nor 0002 (fail
because of _config.txt): the build fails without a mention of
_config.txt; and my output just without 0002: the build fails more
nicely. Also, all other packages returned by "guix search minetest"
still build successfully.

Vivien
From 154ff4665ededc1af5d088987362975b623d8303 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Sun, 19 Sep 2021 17:00:45 +0200
Subject: [PATCH 4/4] gnu: minetest-basic-materials: Depend on
minetest-moreores.

* minetest.scm (minetest-basic-materials): Add minetest-moreores as a propagated input.
---
gnu/packages/minetest.scm | 4 ++++
1 file changed, 4 insertions(+)

Toggle diff (17 lines)
diff --git a/gnu/packages/minetest.scm b/gnu/packages/minetest.scm
index 0730de7351..189889f890 100644
--- a/gnu/packages/minetest.scm
+++ b/gnu/packages/minetest.scm
@@ -221,6 +221,10 @@ numeric identifier TOPIC-ID on the official Minetest forums."
         (base32 "0v6l3lrjgshy4sccjhfhmfxc3gk0cdy73qb02i9wd2vw506v5asx"))
        (file-name (git-file-name name version))))
     (build-system minetest-mod-build-system)
+    (propagated-inputs
+     ;; basic_materials:silver_wire cannot be crafted without
+     ;; moreores:silver_ingot.
+     `(("minetest-moreores" ,minetest-moreores)))
     (home-page (minetest-topic 21000))
     (synopsis "Some \"basic\" materials and items for other Minetest mods to use")
     (description
-- 
2.33.0
From 60eb61bf110a9a3702ae6a7d35efc347363d73f1 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Sun, 19 Sep 2021 16:58:53 +0200
Subject: [PATCH 3/4] gnu: Add minetest-moreores.

* gnu/packages/minetest.scm (minetest-moreores): New variable.
---
gnu/packages/minetest.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/minetest.scm b/gnu/packages/minetest.scm
index fd1439d4d2..0730de7351 100644
--- a/gnu/packages/minetest.scm
+++ b/gnu/packages/minetest.scm
@@ -187,6 +187,25 @@ numeric identifier TOPIC-ID on the official Minetest forums."
   (string-append "https://forum.minetest.net/viewtopic.php?t="
                  (number->string topic-id)))
 
+(define-public minetest-moreores
+  (package
+    (name "minetest-moreores")
+    (version "2.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/minetest-mods/moreores")
+             (commit "0b6f669df4c9b7771c03e0e6ba8effb471cdfcae")))
+       (sha256 (base32 "1chfqbc6bb27aacjc67j5l5wcdvmcsvk2rfmangipd7nwini3y34"))
+       (file-name (git-file-name name version))))
+    (build-system minetest-mod-build-system)
+    (home-page (minetest-topic 549))
+    (synopsis "Adds new ore types")
+    (description "More ores for Minetest.")
+    (license license:zlib)
+    (properties `((upstream-name . "Calinou/moreores")))))
+
 (define-public minetest-basic-materials
   (package
     (name "minetest-basic-materials")
-- 
2.33.0
From a2de70e505e5e541a516cb7f2b8f46e58c0d918f Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Sun, 19 Sep 2021 22:42:49 +0200
Subject: [PATCH 2/4] guix: minetest-build-system: Also install config.txt and
_config.txt

* minetest-build-system.scm (mod-install-plan): Add config.txt and _config.txt to the list of installed files.
---
guix/build/minetest-build-system.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/guix/build/minetest-build-system.scm b/guix/build/minetest-build-system.scm
index 985859036c..79e5a67b89 100644
--- a/guix/build/minetest-build-system.scm
+++ b/guix/build/minetest-build-system.scm
@@ -41,7 +41,7 @@
      ;; See <https://github.com/minetest/minetest/blob/master/doc/lua_api.txt>
      ;; for an incomple list of files that can be found in mods.
      #:include ("mod.conf" "modpack.conf" "settingtypes.txt" "depends.txt"
-                "description.txt")
+                "description.txt" "config.txt" "_config.txt")
      #:include-regexp (".lua$" ".png$" ".ogg$" ".obj$" ".b3d$" ".tr$"
                        ".mts$"))))
 
-- 
2.33.0
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/4] 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(-)

Toggle diff (49 lines)
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
2021-09-19 20:52:06: INFO[Main]: Mod "farming" loaded after 2 ms
Backtrace:
7 (primitive-load "/gnu/store/xrvsdyq9f8wc3am40kmc9yms8c6…")
In ice-9/eval.scm:
191:35 6 (_ _)
In guix/build/gnu-build-system.scm:
838:2 5 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #)
In ice-9/boot-9.scm:
1736:10 4 (with-exception-handler _ _ #:unwind? _ # _)
In srfi/srfi-1.scm:
857:16 3 (every1 #<procedure 7fffeeb28640 at guix/build/gnu-bui…> …)
In guix/build/gnu-build-system.scm:
847:30 2 (_ _)
In guix/build/minetest-build-system.scm:
205:13 1 (check #:outputs _ #:tests? _)
In ice-9/boot-9.scm:
1669:16 0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1669:16: In procedure raise-exception:
minetest raised an error: ~a "2021-09-19 20:52:06: ERROR[Main]: ModError: Failed to load and run script from /gnu/store/fa39r25wskhgv8mzpknc47jjpc5kl1kh-minetest-moreores-2.1.0/share/minetest/mods/moreores/init.lua:"
builder for `/gnu/store/xij2pirv5ycy0xpj6l3alin229r5xj4l-minetest-moreores-2.1.0.drv' failed with exit code 1
build of /gnu/store/xij2pirv5ycy0xpj6l3alin229r5xj4l-minetest-moreores-2.1.0.drv failed
View build log at '/var/log/guix/drvs/xi/j2pirv5ycy0xpj6l3alin229r5xj4l-minetest-moreores-2.1.0.drv.bz2'.
guix build: error: build of `/gnu/store/xij2pirv5ycy0xpj6l3alin229r5xj4l-minetest-moreores-2.1.0.drv' failed
2021-09-19 20:46:33: INFO[Main]: Mod "farming" loaded after 2 ms
2021-09-19 20:46:33: INFO[Main]: Audio: Deinitializing...
2021-09-19 20:46:33: INFO[Main]: Audio: Deinitialized.
2021-09-19 20:46:33: ACTION[Main]: Server: Shutting down
2021-09-19 20:46:33: INFO[Main]: Server: Stopping and waiting threads
2021-09-19 20:46:33: INFO[Main]: Server: Threads stopped
2021-09-19 20:46:33: INFO[Main]: BanManager: saving to ./ipban.txt
2021-09-19 20:46:33: INFO[Main]: Server: Deinitializing scripting
2021-09-19 20:46:33: INFO[Main]: saveMapMeta: mapgen_params not present! Server startup was probably interrupted.
2021-09-19 20:46:33: INFO[Main]: ServerMap: Saved map to .
2021-09-19 20:46:33: INFO[Main]: ~TextureSource() before cleanup: 4 after: 2
2021-09-19 20:46:33: INFO[Main]: Irrlicht resources after cleanup:
2021-09-19 20:46:33: INFO[Main]: Remaining meshes : 0
2021-09-19 20:46:33: INFO[Main]: Remaining textures : 2
2021-09-19 20:46:33: INFO[Main]: 0:#DefaultFont
2021-09-19 20:46:33: INFO[Main]: 1:TTFontGlyphPage_Arimo.Regular.16_0
2021-09-19 20:46:33: INFO[Main]: Remaining materials: 24 (note: irrlicht doesn't support removing renderers)
2021-09-19 20:46:33: INFO[Main]: Audio: Global Deinitialized.
Backtrace:
7 (primitive-load "/gnu/store/xrvsdyq9f8wc3am40kmc9yms8c6…")
In ice-9/eval.scm:
191:35 6 (_ _)
In guix/build/gnu-build-system.scm:
838:2 5 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #)
In ice-9/boot-9.scm:
1736:10 4 (with-exception-handler _ _ #:unwind? _ # _)
In srfi/srfi-1.scm:
857:16 3 (every1 #<procedure 7fffeeb2df40 at guix/build/gnu-bui…> …)
In guix/build/gnu-build-system.scm:
847:30 2 (_ _)
In guix/build/minetest-build-system.scm:
214:13 1 (check #:outputs _ #:tests? _)
In ice-9/boot-9.scm:
1669:16 0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1669:16: In procedure raise-exception:
ERROR:
1. &message: "2021-09-19 20:46:33: ERROR[Main]: ModError: Failed to load and run script from /gnu/store/qsikdr33697sm16pfxcvf41ijkwwz8d2-minetest-moreores-2.1.0/share/minetest/mods/moreores/init.lua:"
2. &message: "2021-09-19 20:46:33: ERROR[Main]: /gnu/store/qsikdr33697sm16pfxcvf41ijkwwz8d2-minetest-moreores-2.1.0/share/minetest/mods/moreores/_config.txt: No such file or directory"
3. &message: "2021-09-19 20:46:33: ERROR[Main]: stack traceback:"
4. &message: "2021-09-19 20:46:33: ERROR[Main]: \t[C]: in function 'dofile'"
5. &message: "2021-09-19 20:46:33: ERROR[Main]: \t...est-moreores-2.1.0/share/minetest/mods/moreores/init.lua:18: in main chunk"
6. &message: "2021-09-19 20:46:33: ERROR[Main]: Check debug.txt for details."
builder for `/gnu/store/qi671jqsaq4k2ah1hr48lbrkzxij9f59-minetest-moreores-2.1.0.drv' failed with exit code 1
build of /gnu/store/qi671jqsaq4k2ah1hr48lbrkzxij9f59-minetest-moreores-2.1.0.drv failed
View build log at '/var/log/guix/drvs/qi/671jqsaq4k2ah1hr48lbrkzxij9f59-minetest-moreores-2.1.0.drv.bz2'.
guix build: error: build of `/gnu/store/qi671jqsaq4k2ah1hr48lbrkzxij9f59-minetest-moreores-2.1.0.drv' failed
V
V
Vivien Kraus wrote on 22 Sep 2021 18:46
391c3b2b8b058845bc07630ac2cd96c06783227b.camel@planete-kraus.eu
lylip on the #guix chat suggested to save the log to disk, so that the
errors can be read in context. I think it is the best thing to do, what
do you think?

Vivien
From f5cafa5aaf26b065f3627d5e013d06c86c251f8f Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Sun, 19 Sep 2021 17:00:45 +0200
Subject: [PATCH 4/4] gnu: minetest-basic-materials: Depend on
minetest-moreores.

* minetest.scm (minetest-basic-materials): Add minetest-moreores as a propagated input.
---
gnu/packages/minetest.scm | 4 ++++
1 file changed, 4 insertions(+)

Toggle diff (17 lines)
diff --git a/gnu/packages/minetest.scm b/gnu/packages/minetest.scm
index 0730de7351..189889f890 100644
--- a/gnu/packages/minetest.scm
+++ b/gnu/packages/minetest.scm
@@ -221,6 +221,10 @@ numeric identifier TOPIC-ID on the official Minetest forums."
         (base32 "0v6l3lrjgshy4sccjhfhmfxc3gk0cdy73qb02i9wd2vw506v5asx"))
        (file-name (git-file-name name version))))
     (build-system minetest-mod-build-system)
+    (propagated-inputs
+     ;; basic_materials:silver_wire cannot be crafted without
+     ;; moreores:silver_ingot.
+     `(("minetest-moreores" ,minetest-moreores)))
     (home-page (minetest-topic 21000))
     (synopsis "Some \"basic\" materials and items for other Minetest mods to use")
     (description
-- 
2.33.0
From 92e59ddbcd185faaf0de00d8ac3cc68fdd13f531 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Sun, 19 Sep 2021 16:58:53 +0200
Subject: [PATCH 3/4] gnu: Add minetest-moreores.

* gnu/packages/minetest.scm (minetest-moreores): New variable.
---
gnu/packages/minetest.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/minetest.scm b/gnu/packages/minetest.scm
index fd1439d4d2..0730de7351 100644
--- a/gnu/packages/minetest.scm
+++ b/gnu/packages/minetest.scm
@@ -187,6 +187,25 @@ numeric identifier TOPIC-ID on the official Minetest forums."
   (string-append "https://forum.minetest.net/viewtopic.php?t="
                  (number->string topic-id)))
 
+(define-public minetest-moreores
+  (package
+    (name "minetest-moreores")
+    (version "2.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/minetest-mods/moreores")
+             (commit "0b6f669df4c9b7771c03e0e6ba8effb471cdfcae")))
+       (sha256 (base32 "1chfqbc6bb27aacjc67j5l5wcdvmcsvk2rfmangipd7nwini3y34"))
+       (file-name (git-file-name name version))))
+    (build-system minetest-mod-build-system)
+    (home-page (minetest-topic 549))
+    (synopsis "Adds new ore types")
+    (description "More ores for Minetest.")
+    (license license:zlib)
+    (properties `((upstream-name . "Calinou/moreores")))))
+
 (define-public minetest-basic-materials
   (package
     (name "minetest-basic-materials")
-- 
2.33.0
From 9176a157e6cd73fe70549d3796772a944db822ed Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Sun, 19 Sep 2021 22:42:49 +0200
Subject: [PATCH 2/4] guix: minetest-build-system: Also install config.txt and
_config.txt

* minetest-build-system.scm (mod-install-plan): Add config.txt and _config.txt to the list of installed files.
---
guix/build/minetest-build-system.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/guix/build/minetest-build-system.scm b/guix/build/minetest-build-system.scm
index df6fb50416..d238056231 100644
--- a/guix/build/minetest-build-system.scm
+++ b/guix/build/minetest-build-system.scm
@@ -41,7 +41,7 @@
      ;; See <https://github.com/minetest/minetest/blob/master/doc/lua_api.txt>
      ;; for an incomple list of files that can be found in mods.
      #:include ("mod.conf" "modpack.conf" "settingtypes.txt" "depends.txt"
-                "description.txt")
+                "description.txt" "config.txt" "_config.txt")
      #:include-regexp (".lua$" ".png$" ".ogg$" ".obj$" ".b3d$" ".tr$"
                        ".mts$"))))
 
-- 
2.33.0
From ffcd1922af4a1249b78f8e749d37b83e5f20034a 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/4] guix: minetest-build-system: Save the full test log

* minetest-build-system.scm (check): Save the full test log.
---
guix/build/minetest-build-system.scm | 35 +++++++++++++++++-----------
1 file changed, 21 insertions(+), 14 deletions(-)

Toggle diff (55 lines)
diff --git a/guix/build/minetest-build-system.scm b/guix/build/minetest-build-system.scm
index 477cc3d1d0..df6fb50416 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,26 @@ 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?)
-             (kill pid SIGINT)
-             (close-port port)
-             (waitpid pid))
-            ((? string? line)
-             (display line)
-             (newline)
-             (loop))
-            ((? eof-object?)
-             (error "minetest didn't start"))))))))
+        (define log-file (open-output-file "guix-test.log"))
+        (let loop ((has-errors? #f))
+          (let ((line (read-line port)))
+            (unless (eof-object? line)
+              (write-line line log-file))
+            (match `(,line ,has-errors?)
+              (((? error? line) _)
+               (loop #t))
+              (((? stop?) #f)
+               (kill pid SIGINT)
+               (close-port port)
+               (waitpid pid))
+              (((? eof-object?) #f)
+               (error "minetest didn't start"))
+              (((or (? stop?) (? eof-object?)) #t)
+               (error "minetest stopped after an error happened, see source/guix_testworld/guix-test.log"))
+              (((? string? line) has-error?)
+               (display line)
+               (newline)
+               (loop has-error?)))))))))
 
 (define %standard-phases
   (modify-phases gnu:%standard-phases
-- 
2.33.0
M
M
Maxime Devos wrote on 22 Sep 2021 19:41
9f186bbdf47037b1f2b1218b0cd73141fa29e140.camel@telenet.be
Vivien Kraus schreef op wo 22-09-2021 om 18:46 [+0200]:
Toggle quote (16 lines)
> + (define log-file (open-output-file "guix-test.log"))
> + (let loop ((has-errors? #f))
> + (let ((line (read-line port)))
> + (unless (eof-obj ect? line)
> + (write-line line log-file))
> + (match `(,line ,has-errors?)
> + (((? error? line) _)
> + (loop #t))
> + (((? stop?) #f)
> + (kill pid SIGINT)
> + (close-port port)
> + (waitpid pid))
> + (((? eof-object?) #f)
> + (error "minetest didn't start"))
> + (((or (? stop?) (? eof-object?)) #t)

'(close-port port)' is missing in this branch.
This is important if 'port' is buffered, to flush the buffers.
From a test at the Guile REPL, it appears ports from 'open-output-file'
are buffered.

Toggle quote (2 lines)
> + (error "minetest stopped after an error happened, see source/guix_testworld/guix-test.log"))

This requires the user to do "--keep-failed". It would be more convenient
if the output of Minetest was send to current-output-port, that way the
errors can be read from the build log (possibly at https://ci.guix.gnu.org/).

Suggestion: don't keep guix-test.log, or only print errors, but rather
output all ouputs of "minetest" to (current-output-port).

Alternative suggestion (to make building less verbose when there are no errors):
this patch, but run "cat" or a guile equivalent thereof (maybe open-input-file
+ sendfile + stat:size) on guix-test.log when there are errors.

Toggle quote (5 lines)
> + (((? string? line) has-error?)
> + (display line)
> + (newline)
> + (loop has-error?)))))))))

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYUtqzRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7kWwAP9qabnf8c0AOwO8N4/SgfmfLMxx
8z2kBoQSFbFk0IYCrAD/RIGKuIe/n5pM18CSe3s3Uy7Qh3FOIEWyOfFM5A8sGgg=
=VnLI
-----END PGP SIGNATURE-----


V
V
Vivien Kraus wrote on 22 Sep 2021 20:04
3130a74c615509be5871c4d4f69ad3e3350557a8.camel@planete-kraus.eu
Le mercredi 22 septembre 2021 à 19:41 +0200, Maxime Devos a écrit :
Toggle quote (2 lines)
> It would be more convenient
> if the output of Minetest was send to current-output-port,
OK, so it’s like the existing solution, except it should not stop just
at the first error.
From ed878447d600aabdfd80073dab4fdb77cef3801d Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Sun, 19 Sep 2021 17:00:45 +0200
Subject: [PATCH 4/4] gnu: minetest-basic-materials: Depend on
minetest-moreores.

* minetest.scm (minetest-basic-materials): Add minetest-moreores as a propagated input.
---
gnu/packages/minetest.scm | 4 ++++
1 file changed, 4 insertions(+)

Toggle diff (17 lines)
diff --git a/gnu/packages/minetest.scm b/gnu/packages/minetest.scm
index 0730de7351..189889f890 100644
--- a/gnu/packages/minetest.scm
+++ b/gnu/packages/minetest.scm
@@ -221,6 +221,10 @@ numeric identifier TOPIC-ID on the official Minetest forums."
         (base32 "0v6l3lrjgshy4sccjhfhmfxc3gk0cdy73qb02i9wd2vw506v5asx"))
        (file-name (git-file-name name version))))
     (build-system minetest-mod-build-system)
+    (propagated-inputs
+     ;; basic_materials:silver_wire cannot be crafted without
+     ;; moreores:silver_ingot.
+     `(("minetest-moreores" ,minetest-moreores)))
     (home-page (minetest-topic 21000))
     (synopsis "Some \"basic\" materials and items for other Minetest mods to use")
     (description
-- 
2.33.0
From f018ebee7972f49bfd6c3012d822432f9d97b767 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Sun, 19 Sep 2021 16:58:53 +0200
Subject: [PATCH 3/4] gnu: Add minetest-moreores.

* gnu/packages/minetest.scm (minetest-moreores): New variable.
---
gnu/packages/minetest.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/minetest.scm b/gnu/packages/minetest.scm
index fd1439d4d2..0730de7351 100644
--- a/gnu/packages/minetest.scm
+++ b/gnu/packages/minetest.scm
@@ -187,6 +187,25 @@ numeric identifier TOPIC-ID on the official Minetest forums."
   (string-append "https://forum.minetest.net/viewtopic.php?t="
                  (number->string topic-id)))
 
+(define-public minetest-moreores
+  (package
+    (name "minetest-moreores")
+    (version "2.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/minetest-mods/moreores")
+             (commit "0b6f669df4c9b7771c03e0e6ba8effb471cdfcae")))
+       (sha256 (base32 "1chfqbc6bb27aacjc67j5l5wcdvmcsvk2rfmangipd7nwini3y34"))
+       (file-name (git-file-name name version))))
+    (build-system minetest-mod-build-system)
+    (home-page (minetest-topic 549))
+    (synopsis "Adds new ore types")
+    (description "More ores for Minetest.")
+    (license license:zlib)
+    (properties `((upstream-name . "Calinou/moreores")))))
+
 (define-public minetest-basic-materials
   (package
     (name "minetest-basic-materials")
-- 
2.33.0
From 9b6a7751a3240e6363b231a50f6795aaf0433f76 Mon Sep 17 00:00:00 2001
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Sun, 19 Sep 2021 22:42:49 +0200
Subject: [PATCH 2/4] guix: minetest-build-system: Also install config.txt and
_config.txt

* minetest-build-system.scm (mod-install-plan): Add config.txt and _config.txt to the list of installed files.
---
guix/build/minetest-build-system.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/guix/build/minetest-build-system.scm b/guix/build/minetest-build-system.scm
index c14c6d1fcc..5f68686067 100644
--- a/guix/build/minetest-build-system.scm
+++ b/guix/build/minetest-build-system.scm
@@ -41,7 +41,7 @@
      ;; See <https://github.com/minetest/minetest/blob/master/doc/lua_api.txt>
      ;; for an incomple list of files that can be found in mods.
      #:include ("mod.conf" "modpack.conf" "settingtypes.txt" "depends.txt"
-                "description.txt")
+                "description.txt" "config.txt" "_config.txt")
      #:include-regexp (".lua$" ".png$" ".ogg$" ".obj$" ".b3d$" ".tr$"
                        ".mts$"))))
 
-- 
2.33.0
From f1eec756c9b35442f7f2730585eb671e57ddb50c 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/4] guix: minetest-build-system: Gather the whole output when
a test fails

* minetest-build-system.scm (check): Gather the whole output when a test fails.
---
guix/build/minetest-build-system.scm | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)

Toggle diff (48 lines)
diff --git a/guix/build/minetest-build-system.scm b/guix/build/minetest-build-system.scm
index 477cc3d1d0..c14c6d1fcc 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,24 @@ 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 ((has-errors? #f))
+          (match `(,(read-line port) ,has-errors?)
+            (((? error? line) _)
+             (display line)
+             (newline)
+             (loop #t))
+            (((? stop?) #f)
              (kill pid SIGINT)
              (close-port port)
              (waitpid pid))
-            ((? string? line)
+            (((? eof-object?) #f)
+             (error "minetest didn't start"))
+            (((or (? stop?) (? eof-object?)) #t)
+             (error "minetest raised an error"))
+            (((? string? line) has-error?)
              (display line)
              (newline)
-             (loop))
-            ((? eof-object?)
-             (error "minetest didn't start"))))))))
+             (loop has-error?))))))))
 
 (define %standard-phases
   (modify-phases gnu:%standard-phases
-- 
2.33.0
M
M
Maxime Devos wrote on 22 Sep 2021 20:15
af5129fbe2e24f1e9287894ce320b2c76fcda43f.camel@telenet.be
Vivien Kraus schreef op wo 22-09-2021 om 20:04 [+0200]:
Toggle quote (6 lines)
> Le mercredi 22 septembre 2021 à 19:41 +0200, Maxime Devos a écrit :
> > It would be more convenient
> > if the output of Minetest was send to current-output-port,
> OK, so it’s like the existing solution, except it should not stop just
> at the first error.

The latest patch you sent looks good to me, but I didn't test ti.

Greetings
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYUty1BccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7kuAAP9FEQ5GGVafbaSxK3eZ+5DBZaxK
Gwd5Owy7dYU1X6VcAAD7BYj/TbYFnEQpnjum/8YdX+D9w4fi2b/f2eu79dv3Bgg=
=0LUI
-----END PGP SIGNATURE-----


V
V
Vivien Kraus wrote on 22 Sep 2021 20:37
17d20f0f53dfe080278c7b52837b6e360cb3cffa.camel@planete-kraus.eu
Le mercredi 22 septembre 2021 à 20:15 +0200, Maxime Devos a écrit :
Toggle quote (2 lines)
> The latest patch you sent looks good to me, but I didn't test ti.

I tested it by comparing the build of minetest-moreores when it fails
because of the missing file and when it succeeds. Do you think it
should be enough if it were to be tested that way?

Vivien
M
M
Maxime Devos wrote on 22 Sep 2021 20:43
7b49fa07477c7bcd898267b09980fd883e830519.camel@telenet.be
Vivien Kraus schreef op wo 22-09-2021 om 20:37 [+0200]:
Toggle quote (7 lines)
> Le mercredi 22 septembre 2021 à 20:15 +0200, Maxime Devos a écrit :
> > The latest patch you sent looks good to me, but I didn't test ti.
>
> I tested it by comparing the build of minetest-moreores when it fails
> because of the missing file and when it succeeds. Do you think it
> should be enough if it were to be tested that way?

That should be enough I think.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYUt5axccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7smkAQCxyH0sUWgE9FsjMPSZ2ulCGk8d
uPY9dpeJ1l3ivxp/5AEA0wxlyKYKQ7k7fQlGlJO/IhEBc4hldZ/0R/Vy95IK9A0=
=zvSO
-----END PGP SIGNATURE-----


V
V
Vivien Kraus wrote on 14 Oct 2021 17:14
b4bc3bd85e3f0b9dddafd86f7278df6a78b0bcf5.camel@planete-kraus.eu
Hello Maxime,

Le mercredi 22 septembre 2021 à 20:43 +0200, Maxime Devos a écrit :
Toggle quote (14 lines)
> Vivien Kraus schreef op wo 22-09-2021 om 20:37 [+0200]:
> > Le mercredi 22 septembre 2021 à 20:15 +0200, Maxime Devos a écrit :
> > > The latest patch you sent looks good to me, but I didn't test ti.
> >
> > I tested it by comparing the build of minetest-moreores when it
> > fails
> > because of the missing file and when it succeeds. Do you think it
> > should be enough if it were to be tested that way?
>
> That should be enough I think.
>
> Greetings,
> Maxime.

On IRC you said that you did one test. Aside from you, it seems that
noone cares about minetest.

Would you accept this patch? If not, then I’ll trash the error handler
modification and just keep the new packages. What do you think?

Best regards,

Vivien
M
M
Maxime Devos wrote on 15 Oct 2021 22:18
212dfdb8c6dfdf33b9d3fa793fc875b313da8433.camel@telenet.be
Vivien Kraus schreef op do 14-10-2021 om 17:14 [+0200]:
Toggle quote (5 lines)
> On IRC you said that you did one test. Aside from you, it seems that
> noone cares about minetest.
>
> Would you accept this patch? [...]

IIRC, I tested the patch, it worked, and it looked good to me.
However, I'm not a committer.

Anyway, I won't be working on Guix for a while (and I've unsubscribed
from the mailing lists) (though I intend to continue eventually), so I
won't be available for (minetest-related) reviews.

Greetings,
Maxime

--
The computer I'm typing this on doesn't have the secret key,
so the e-mail isn't signed.
T
T
Tobias Geerinckx-Rice wrote on 16 Oct 2021 17:32
(name . Vivien Kraus)(address . vivien@planete-kraus.eu)(address . 50677-done@debbugs.gnu.org)
871r4lc6np.fsf@nckx
Vivien,

Thanks! I've pushed this series as
df2404482495bc3af03e7fc902af1e6b0d10b4a4 et al.

I made a only few small tweaks, mainly to the commit message:

Toggle quote (2 lines)
> gnu: minetest-basic-materials: Depend on minetest-moreores.

‘Depend’ sounds wrong to me; it either does, or it doesn't, we
don't determine that. Changed to ‘Propagate …’

Toggle quote (3 lines)
> * minetest.scm (minetest-basic-materials): Add minetest-moreores
> as a propagated input.

Keep Git commit message body lines <=72 characters. Most
(non-Guix) tooling is built around that assumption.

Also use full relative file names, and use [field] notation where
appropriate:

* gnu/packages/foo.scm (foo)[propagated-inputs]: Add bar.

For the build system patches, I changed

Toggle quote (2 lines)
> guix: minetest-build-system: […]

to

build-system/minetest: […]

Why? Because it's shorter. Is this a documented rule? I can't
say!

Toggle quote (3 lines)
> ;; basic_materials:silver_wire cannot be crafted without
> ;; moreores:silver_ingot.

Documenting this is a great idea.

Toggle quote (2 lines)
> (commit "0b6f669df4c9b7771c03e0e6ba8effb471cdfcae")))

I changed this to

(commit (string-append "v" version))

to use the git tag.

Both have advantages & disadvantages, but this is our currently
preferred style.

Toggle quote (3 lines)
> (synopsis "Adds new ore types")
> (description "More ores for Minetest.")

These aren't acceptable. See (guix)Synopses and Descriptions.

This was my attempt at improving the importer's lazywork:

(synopsis "Additional ore types, tools, swords, and rails for
Minetest")
(description
"This Minetest mod adds new ore types to the game (mithril,
silver) as well
as swords and tools made of different materials. It also adds
copper rails.")

Bit vague, but you know why.

Closing; thanks!

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYWr0Sg0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15hP4A/RitNDMPe62Fyacx5fjHxi7t8bPHJ4Q+eOdHJB+q
sIHoAQDRb8iRRg3TJq+3PpBIF2inHT1uBO/Ubo0Dtc/eY6sYCQ==
=pw25
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 50677@debbugs.gnu.org