[PATCH] [core-updates?] gnu: r-with-tests: Hardcode path to coreutils’ rm

  • Done
  • quality assurance status badge
Details
2 participants
  • Lars-Dominik Braun
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Lars-Dominik Braun
Severity
normal
L
L
Lars-Dominik Braun wrote on 26 Jul 2021 09:25
[PATCH] [core-updates?] gnu: r-w ith-tests: Hardcode path to coreutils’ rm
(address . guix-patches@gnu.org)
YP5jX/7V0Pn4KLBy@noor.fritz.box
When running R in a container like this

guix environment --no-cwd -C --ad-hoc r-minimal -- Rscript -e 'Sys.timezone()'

it would print an additional line

sh: rm: command not found

before exiting.

* gnu/packages/statistics.scm (r-with-tests) [#:phases]: Add substitute*
to patch call to `rm` and rename phase to reflect what it does now.
---
gnu/packages/statistics.scm | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

Toggle diff (26 lines)
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index ce9f1bf888..7ba7d9f20d 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -213,12 +213,15 @@ This package also provides @command{xls2csv} to export Excel files to CSV.")
(substitute* "src/library/base/makebasedb.R"
(("compress = TRUE") "compress = FALSE"))
#t))
- (add-before 'configure 'patch-uname
+ (add-before 'configure 'patch-coreutils-paths
(lambda* (#:key inputs #:allow-other-keys)
- (let ((uname-bin (string-append (assoc-ref inputs "coreutils")
- "/bin/uname")))
+ (let* ((coreutils (assoc-ref inputs "coreutils"))
+ (uname-bin (string-append coreutils "/bin/uname"))
+ (rm-bin (string-append coreutils "/bin/rm")))
(substitute* "src/scripts/R.sh.in"
- (("uname") uname-bin)))
+ (("uname") uname-bin))
+ (substitute* "src/unix/sys-std.c"
+ (("rm -Rf ") (string-append rm-bin " -Rf "))))
#t))
(add-after 'unpack 'build-reproducibly
(lambda _
--
2.31.1
R
R
Ricardo Wurmus wrote on 26 Jul 2021 12:50
[PATCH] [core-updates?] gnu: r-with-tests: Hardcode path to coreutils’ rm
(address . 49740@debbugs.gnu.org)
871r7l2vsn.fsf@elephly.net
Hi,

this looks good to me.

Please push to a new “r-updates” branch based on top of “master”.

--
Ricardo
L
L
Lars-Dominik Braun wrote on 26 Jul 2021 13:15
Re: [bug#49740] [PATCH] [core- updates?] gnu: r-with-tests: Hardcode path to coreutils ’ rm
(address . 49740-done@debbugs.gnu.org)
YP6ZVFGMy4jtGudV@noor.fritz.box
Hi,

done, closing.

Lars
Closed
?