cabal-install fails with tar checksum error
duncan.coutts at worc.ox.ac.uk
Thu Apr 30 15:12:17 EDT 2009
On Thu, 2009-04-30 at 15:45 +0100, Alistair Bayley wrote:
> On WinXP. I've uploaded Takusen-0.8.4 to hackage, and thought I'd see
> how well cabal-install downloads and installs it.
> cabal install Takusen --flags="sqlite odbc oracle postgres" --reinstall -v3
> results in (with some trimming):
> In order, the following would be installed:
> Takusen-0.8.4 (reinstall)
> Takusen-0.8.4 has already been downloaded.
> Extracting C:\Documents and Settings\bayleya\Application
> Data\cabal\packages\hackage.haskell.org\Takusen\0.8.4\Takusen-0.8.4.tar.gz to
> cabal: Error: some packages failed to install:
> Takusen-0.8.4 failed while unpacking the package. The exception was:
> user error (TAR checksum error)
> The uploaded package was created with "darcs dist -d Takusen-0.8.4".
> Can I check before uploading that the tar file is valid?
Not easily at the moment I'm afraid. In future the server will use the
same tar code and so will detect the non-portable tar archive format.
There's no open ticket on this issue at the moment. Would you mind
You can ensure that you are generating a portable tar archive by using
cabal sdist rather than darcs dist. darcs calls gnu tar which can
generate non-portable archives in some circumstances, eg when gnu tar is
presented with long names etc. (In fact gnu tar by default generates
non-standard archive formats, but a format that every recent archive
program can understand, at least in its basic features). Or if you can
get darcs dist to pass extra flags to gnu tar then you can pass
--format=ustar or --format=posix.
In the specific case of your Takusen-0.8.4.tar.gz, the latest version of
cabal-install uses updated tar reading code that can grok some
non-standard formats and so it doesn't actually complain about this
More information about the cabal-devel