all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 28157@debbugs.gnu.org
Subject: bug#28157: “r-minimal” retains no reference to “which”
Date: Tue, 22 Aug 2017 13:02:23 +0200	[thread overview]
Message-ID: <871so3x3uo.fsf@elephly.net> (raw)
In-Reply-To: <87o9r87xhx.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 759 bytes --]


Ludovic Courtès <ludo@gnu.org> writes:

> Ricardo Wurmus <rekado@elephly.net> skribis:
>
>> Right.  In the case of R, the environment for a package is serialized to
>> a possibly compressed data file (.Rdb) with an index (.Rdx).
>> “Sys.which” is part of the “base” package and I cannot find a plain text
>> reference to “bin/which” in the binaries for “base”.
>
> Doh!  That’s a problem.  The GC won’t detect those references either,
> which can lead to early-deletion problems.
>
>> I don’t know if we can (or should) disable compression for Rdb files.
>
> We’ll probably have to disable it.  (According to ‘file’ it’s no a
> standard compression format like gzip; maybe raw zlib without gzip
> headers?)

Here’s a patch:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-r-minimal-Do-not-compress-serialized-files.patch --]
[-- Type: text/x-patch, Size: 1853 bytes --]

From bbacb223cbd6f1ba0ca77eda9d168e325537e3f3 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Tue, 22 Aug 2017 12:59:48 +0200
Subject: [PATCH] gnu: r-minimal: Do not compress serialized files.

* gnu/packages/statistics.scm (r-minimal)[arguments]: Replace build phase
"patch-which" with "do-not-compress-serialized-files".
[propagated-inputs]: Move "which" from here...
[inputs]: ...to here.
---
 gnu/packages/statistics.scm | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index dc7491acd..676752e03 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -127,10 +127,10 @@ be output in text, PostScript, PDF or HTML.")
        #:phases
        (modify-phases %standard-phases
          ;; FIXME: see bug #28157.
-         (add-before 'configure 'patch-which
+         (add-before 'configure 'do-not-compress-serialized-files
            (lambda* (#:key inputs #:allow-other-keys)
-             (substitute* "src/library/base/R/unix/system.unix.R"
-               (("@WHICH@") "which"))
+             (substitute* "src/library/base/makebasedb.R"
+               (("compress = TRUE") "compress = FALSE"))
              #t))
          (add-before 'configure 'patch-uname
            (lambda* (#:key inputs #:allow-other-keys)
@@ -250,10 +250,8 @@ be output in text, PostScript, PDF or HTML.")
        ("libxt" ,libxt)
        ("pcre" ,pcre)
        ("readline" ,readline)
+       ("which" ,which)
        ("zlib" ,zlib)))
-    ;; FIXME: By default Sys.which embeds a reference to "which", but this
-    ;; reference is not detected by Guix (see bug #28157).
-    (propagated-inputs `(("which" ,which)))
     (native-search-paths
      (list (search-path-specification
             (variable "R_LIBS_SITE")
-- 
2.14.1


[-- Attachment #3: Type: text/plain, Size: 286 bytes --]


I have built r-minimal with it and confirmed that “which” is retained as
a reference.  I don’t know if this causes any other problems down the
road, but I think it should not be a problem.

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

  reply	other threads:[~2017-08-22 11:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-20 11:16 bug#28157: “r-minimal” retains no reference to “which” Ricardo Wurmus
2017-08-22  8:51 ` Ludovic Courtès
2017-08-22  9:19   ` Ricardo Wurmus
2017-08-22  9:29     ` Ricardo Wurmus
2017-08-22  9:38     ` Ludovic Courtès
2017-08-22 11:02       ` Ricardo Wurmus [this message]
2017-08-22 13:40         ` Ludovic Courtès
2017-08-22 14:03           ` Ricardo Wurmus
2017-08-22 14:33             ` Ricardo Wurmus

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871so3x3uo.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=28157@debbugs.gnu.org \
    --cc=ludo@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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.