[PATCH] gnu: minetest: Fix absolute path to 'rm' command.

  • Done
  • quality assurance status badge
Details
2 participants
  • Leo Prikler
  • Hass, Trevor Stenten
Owner
unassigned
Submitted by
Hass, Trevor Stenten
Severity
normal
H
H
Hass, Trevor Stenten wrote on 14 Apr 2021 05:53
(name . guix-patches@gnu.org)(address . guix-patches@gnu.org)
DM5PR03MB330675130CF96BD49E2A3D85AE4E9@DM5PR03MB3306.namprd03.prod.outlook.com
Hello Guix,

The attached patch resolves an issue where Minetest cannot delete worlds or downloaded content.

Thank you,
Trevor
Attachment: file
From b420ef5912b6b04023991f44db3e8a4f32091022 Mon Sep 17 00:00:00 2001
From: Trevor Hass <thass@okstate.edu>
Date: Tue, 13 Apr 2021 22:05:08 -0500
Subject: [PATCH] gnu: minetest: Fix absolute path to 'rm' command.

* gnu/packages/games.scm (minetest): Add 'set-rm' phase to substitute absolute path to 'rm'. Add 'coreutils' to inputs.
---
gnu/packages/games.scm | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

Toggle diff (38 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index dbc72446b2..6dedfa7419 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -52,7 +52,7 @@
;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us>
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de>
-;;; Copyright © 2020 Trevor Hass <thass@okstate.edu>
+;;; Copyright © 2020, 2021 Trevor Hass <thass@okstate.edu>
;;; Copyright © 2020, 2021 Leo Prikler <leo.prikler@student.tugraz.at>
;;; Copyright © 2020 Lu hux <luhux@outlook.com>
;;; Copyright © 2020 Tomás Ortín Fernández <tomasortin@mailbox.org>
@@ -3496,6 +3496,12 @@ match, cannon keep, and grave-itation pit.")
(setenv "MINETEST_SUBGAME_PATH"
(string-append (getcwd) "/games")) ; for check
#t))
+ (add-after 'unpack 'set-rm
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/filesys.cpp"
+ (("\"/bin/rm\"")
+ (string-append "\"" (assoc-ref inputs "coreutils") "/bin/rm\"")))
+ #t))
(replace 'check
(lambda _
;; Thanks to our substitutions, the tests should also run
@@ -3511,7 +3517,8 @@ match, cannon keep, and grave-itation pit.")
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs
- `(("curl" ,curl)
+ `(("coreutils" ,coreutils)
+ ("curl" ,curl)
("freetype" ,freetype)
("gettext" ,gettext-minimal)
("gmp" ,gmp)
--
2.31.1
L
L
Leo Prikler wrote on 14 Apr 2021 09:45
cade8c3579c7ee68a30bb15e0f1666fd9f2e1910.camel@student.tugraz.at
Hi Trevor,
Am Mittwoch, den 14.04.2021, 03:53 +0000 schrieb Hass, Trevor Stenten:
Toggle quote (4 lines)
> Hello Guix,
>
> The attached patch resolves an issue where Minetest cannot delete
> worlds or downloaded content.
I've pushed it with some cosmetic changes as
c5e149a9d9cf25c68da817f46ea0cbf5442d39bd.

Thanks,
Leo
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 47765
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch