unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#49740] [PATCH] [core-updates?] gnu: r-with-tests: Hardcode path to coreutils’ rm
@ 2021-07-26  7:25 Lars-Dominik Braun
  2021-07-26 10:50 ` Ricardo Wurmus
  0 siblings, 1 reply; 3+ messages in thread
From: Lars-Dominik Braun @ 2021-07-26  7:25 UTC (permalink / raw)
  To: 49740

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

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





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#49740] [PATCH] [core-updates?] gnu: r-with-tests: Hardcode path to coreutils’ rm
  2021-07-26  7:25 [bug#49740] [PATCH] [core-updates?] gnu: r-with-tests: Hardcode path to coreutils’ rm Lars-Dominik Braun
@ 2021-07-26 10:50 ` Ricardo Wurmus
  2021-07-26 11:15   ` bug#49740: " Lars-Dominik Braun
  0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Wurmus @ 2021-07-26 10:50 UTC (permalink / raw)
  To: 49740

Hi,

this looks good to me.

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

-- 
Ricardo




^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#49740: [PATCH] [core-updates?] gnu: r-with-tests: Hardcode path to coreutils’ rm
  2021-07-26 10:50 ` Ricardo Wurmus
@ 2021-07-26 11:15   ` Lars-Dominik Braun
  0 siblings, 0 replies; 3+ messages in thread
From: Lars-Dominik Braun @ 2021-07-26 11:15 UTC (permalink / raw)
  To: 49740-done

Hi,

done, closing.

Lars





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-26 11:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-26  7:25 [bug#49740] [PATCH] [core-updates?] gnu: r-with-tests: Hardcode path to coreutils’ rm Lars-Dominik Braun
2021-07-26 10:50 ` Ricardo Wurmus
2021-07-26 11:15   ` bug#49740: " Lars-Dominik Braun

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