From p.dalgaard at biostat.ku.dk  Sat Sep 27 11:15:21 2008
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: Sat, 27 Sep 2008 11:15:21 +0200
Subject: [Rd] Bug? in some package installations when a Print is added
 in	memory.c
In-Reply-To: <b2d9df730809270015p489d14a7jc3576fa027809120@mail.gmail.com>
References: <b2d9df730809270015p489d14a7jc3576fa027809120@mail.gmail.com>
Message-ID: <48DDF9A9.7010502@biostat.ku.dk>

subramanian R wrote:
>
> So essentially the problem is these packages try to compile files which are
> printed out!!!!!!!!!!!And if there are prints in memory.c they FAIL.
>
> Is this a BUG?
>   

Only in your code. There are things in the INSTALL script that rely on 
calling R and looking at its output, e.g.

  lib=`echo "cat('\n~~~', .libPaths()[1], '\n', sep = '')" | \
    R_DEFAULT_PACKAGES=NULL "${R_EXE}" --no-restore --slave | \
    grep '^~~~' | ${SED} 's/.*~~~//'`

This implies that if you modify R's output, you may break things. It is 
not a bug that R's developers assume that they know what the output of R 
will be. It would be if the assumptions were wrong, but this does not 
include the case where someone makes deliberate changes to the code.

(The section above may or may not be the one that is giving you problem. 
It's just to make the point.)

The fix could be to conditionalize your test prints on something (an 
environment variable, or if you can access flags set by --slave) or just 
not use the hacked version for package installation.

-- 
   O__  ---- Peter Dalgaard             ?ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907



[Rd] Bug? in some package installations when a Print is added in memory.c
Peter Dalgaard