[Rd] Re: [R] case-insensitive ZIP

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Nov 2 12:12:55 CET 2004


On Tue, 2 Nov 2004 Ted.Harding at nessie.mcc.ac.uk wrote:

> On 02-Nov-04 Prof Brian Ripley wrote:
> > [...]
> > [Analogously, R CMD INSTALL will not install .tgz files on Unix,
> > even though some people distribute them: they are (equally) not
> > a supported format.]
> 
> Hmmm.
> Maybe I'm out of date (R 1.8.0) but my Linux /usr/lib/R/bin/INSTALL

You are, four and shortly to be five releases out of date.  But in this 
case R's documentation is even more out of date.

> has:
> 
>       if test -f "${1}"; then
>         pkgname=`basename "${1}"`
>         ## Also allow for 'package.tgz' ...
>         pkgname=`basename "${pkgname}" .tgz`
>         pkgname=`echo "${pkgname}" | sed 's/_.*//'`
>         ## ...
>         gzip -dc "${1}" | (cd "${tmpdir}" && ${TAR} -mxf -)
> 
> which looks to me as though it should cope fine with *.tgz as well
> as with *.tar.gz, since the 'gzip -dc' doesn't care what the name
> "${1}" is, and the ${TAR} is getting the unzipped output on stdin.
> 
> And in any case it looks as though 'pkgname' will come out right
> whatever follows the first "_." in the tar file name (so long as
> the file name is of the form pkgname_.*).

However, that's not what ?INSTALL says is supported so it is an 
unsupported feature, that used not to work and it seems has not been 
announced in NEWS.  

It looks like it was an unannounced change in 2002.  After some digging 
I found that the relevant cvs entry appears to be

  r21427 | hornik | 2002-10-05 19:30:34 +0100 (Sat, 05 Oct 2002) | 3 lines

  Make installing 'foo.tgz' source packages work.
  Do not preserve modification times when unpacking sources.

on R-1-6-patches (that is, a new feature on a patches branch).

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list