From ripley at stats.ox.ac.uk  Tue Nov  2 12:12:55 2004
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Tue Nov  2 12:13:02 2004
Subject: [Rd] Re: [R] case-insensitive ZIP
In-Reply-To: <XFMail.041102100326.Ted.Harding@nessie.mcc.ac.uk>
Message-ID: <Pine.LNX.4.44.0411021058140.11989-100000@gannet.stats>

On Tue, 2 Nov 2004 Ted.Harding@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@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


[Rd] Re: [R] case-insensitive ZIP
Prof Brian Ripley