Skip to content

case-insensitive ZIP

5 messages · Uwe Ligges, Brian Ripley, (Ted Harding) +1 more

#
Primer, Jeremy (FID) wrote:

            
[moved to R-devel]

Hmmm. Recent versions of R require correctly installed versions (using R 
CMD INSTALL) of the packages. It is hard work to get a file called *.ZIP 
(rather than *.zip) that contains a valid binary package for Windows.
I'd vote against such a change, since the recent behaviour suggests 
perfectly well that the file probably won't work.

Uwe Ligges
a !
#
On Tue, 2 Nov 2004, Uwe Ligges wrote:

            
Perhaps you could tell us why you do this?  Where do you get `contributed 
zipfiles' that are actually `ZIPfiles', especially as CRAN has .zip files 
you could get instead?  Or is the problem in the way you get them?
Nothing stops people with `atypical installations' amending functions to 
suit their atypicality, but it is usually better to fix your local 
problems that expect your tools to workaround them.

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

Best wishes,
Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding@nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861  [NB: New number!]
Date: 02-Nov-04                                       Time: 10:03:26
------------------------------ XFMail ------------------------------
#
On Tue, 2 Nov 2004 Ted.Harding@nessie.mcc.ac.uk wrote:

            
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.
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).
#
(Ted Harding) <Ted.Harding@nessie.mcc.ac.uk> writes:
You are, but it still has...
I don't think an unversioned .tar.gz file survives that treatment
though.