unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars-Dominik Braun <lars@6xq.net>
To: 49740@debbugs.gnu.org
Subject: [bug#49740] [PATCH] [core-updates?] gnu: r-with-tests: Hardcode path to coreutils’ rm
Date: Mon, 26 Jul 2021 09:25:19 +0200	[thread overview]
Message-ID: <YP5jX/7V0Pn4KLBy@noor.fritz.box> (raw)

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





             reply	other threads:[~2021-07-26  7:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26  7:25 Lars-Dominik Braun [this message]
2021-07-26 10:50 ` [bug#49740] [PATCH] [core-updates?] gnu: r-with-tests: Hardcode path to coreutils’ rm Ricardo Wurmus
2021-07-26 11:15   ` bug#49740: " Lars-Dominik Braun

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=YP5jX/7V0Pn4KLBy@noor.fritz.box \
    --to=lars@6xq.net \
    --cc=49740@debbugs.gnu.org \
    /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).