Open joeyh opened 8 years ago
Upgraded cabal and reproduced the cabal update problem with the new one.
cabal-install version 1.24.0.0 compiled using version 1.24.0.0 of the Cabal library
Thanks for providing test files and logs.
I recently run into the same problem by using a shitty 3G internet connection. Here is the log:
$ cabal update
Config file path source is default config file.
Config file /home/carlos/.cabal/config not found.
Writing default configuration to /home/carlos/.cabal/config
Downloading the latest package list from hackage.haskell.org
Codec.Compression.Zlib: compressed data stream format error (incorrect data
check)
$ cabal update
Downloading the latest package list from hackage.haskell.org
Skipping download: local and remote files match.
$ cat .cabal/packages/hackage.haskell.org/00-index.tar.gz.etag
"225056991d2ff821d9eeeb05d7247028"%
$ md5sum .cabal/packages/hackage.haskell.org/00-index.tar.gz
ae3a5f7566882cec3ab7738e98fe705c .cabal/packages/hackage.haskell.org/00-index.tar.gz
The problem is that in the presence of an error cabal leaves the index in an inconsistent state where the etag does not match the downloaded tarball checksum.
I guess a solution would be to check that the etag actually matches the index checksum before not redownloading the index.
I'm using: cabal-install version 1.24.0.2 compiled using version 1.24.2.0 of the Cabal library
[Edit] Added cabal version.
In a McDonalds, cabal update failed the first time with "cabal: Codec.Compression.Zlib: premature end of compressed stream", but the second time it said "Local and remote files match" despite only having downloaded a prefix of the 00-index.tar.gz and not being able to install any packages.
https://tmp.kitenet.net/cabal/ has the files download and a cabal -v3 log and curl -v log.
Also got the codec error on download of some packages from hackage. This left the cached and corrupt package tarballs in .cabal and prevented cabal install from installing them even after I got to a good network.
cabal-install version 1.22.6.0 using version 1.22.5.0 of the Cabal library