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

Peter Dalgaard p.dalgaard at biostat.ku.dk
Sat Sep 27 11:15:21 CEST 2008


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



More information about the R-devel mailing list