From hintak_leung at yahoo.co.uk  Fri Apr  1 22:01:33 2011
From: hintak_leung at yahoo.co.uk (Hin-Tak Leung)
Date: Fri, 1 Apr 2011 21:01:33 +0100 (BST)
Subject: [Rd] "R CMD check" accepts but "R CMD INSTALL" rejects a tar
	ball.
In-Reply-To: <0A7CA201-501F-4C5F-B24E-51781C854F29@r-project.org>
Message-ID: <656588.10292.qm@web29515.mail.ird.yahoo.com>

--- On Fri, 1/4/11, Simon Urbanek <simon.urbanek at r-project.org> wrote:
> >> So the difference is whether you use external or
> internal
> >> tar. 'g' is the global pax header extension so the
> format
> >> you created is really pax and not tar (pax defines
> two new
> >> types 'x' and 'g').
> >> 
> >> Cheers,
> >> Simon
> > 
> > Okay, thanks. So I guess git-archive --format=tar uses
> GNU tar extensions (not too surprising). So this is
> documented... and a documented incompatibilities between
> different tar/tar extensions. But this behavior of R is a
> bit unexpected - When R CMD check (which involves installing
> to a temporary location then loads it and runs various
> things) works and R CMD INSTALL itself does not.
> > 
> > OTOH, should this be reported to the GIT people?
> > 
> 
> I think you should re-read my e-mail more carefully --
> those are not GNU extensions, those are headers used by pax,
> not tar. pax is a format inspired by tar and introduced in
> POSIX.1-2001, see
> http://en.wikipedia.org/wiki/Pax_(Unix)
> 
> Cheers,
> Simon


Argh, got it. The more informative page is in GNU tar's man page, but even GNU tar doesn't write pax by default. I happened to have git's git repository in my hard disc, and you are correct, git-archive, according to its source code, does write pax header, and refers to pax in several places. So git-archive's documentation (and its '--format=tar' option) is misleading; although even GNU fileutils says the ungzip'ed bundle is "posix tar". Go figure...

OTOH, "R CMD check" extracts the content (and does an install) and 'R CMD INSTALL' itself does not, that's a bit inconsistent.


> 
> 
> >> 
> >> 
> >> On Apr 1, 2011, at 10:19 AM, Hin-Tak Leung wrote:
> >> 
> >>> I have somehow managed to made a source tar
> ball which
> >> "R CMD check" accepts but "R CMD INSTALL" rejects
> with:
> >>> 
> >>> ------------------
> >>> Warning in untar2(tarfile, files, list, exdir)
> :
> >>>???checksum error for entry
> 'pax_global_header'
> >>> Error in untar2(tarfile, files, list, exdir)
> :
> >> unsupported entry type ?g?
> >>> ------------------
> >>> 
> >>> This happens with both R 2.12.2 (x86 linux)
> and R svn
> >> (x86_64 linux). Since R CMD check does install as
> part of
> >> the check process, there is probably a bug
> somewhere. The
> >> tar ball is uploaded at:
> >>> 
> >>> http://htl10.users.sourceforge.net/tmp/Matrix_0.999375-48.tar.gz
> >>> 
> >>> and tar -xzpvf works. It is possible to do R
> CMD
> >> INSTALL from the untar'ed data, so I am a bit lost
> at where
> >> the problem is.
> >>> 
> >>> The tar ball was generated with 
> >>>? ? git archive ... | gzip >
> >> package.tar.gz
> >>> similar to the example at the bottom of
> git-archive.
> >>> 
> >>> It is the result of git cherry-pick trunk at 2658
> +
> >> Matrix-for-R-2.13 at 2657 .
> >>> 
> >>>
> ______________________________________________
> >>> R-devel at r-project.org
> >> mailing list
> >>> https://stat.ethz.ch/mailman/listinfo/r-devel
> >> 
> >> 
> > 
> > 
> 
>



[Rd] "R CMD check" accepts but "R CMD INSTALL" rejects a tar ball.
Hin-Tak Leung