PSA: `cabal update` command needs manual unsticking

Dear Haskellers, A recent update to hackage, which fixed up the 01-index.tar.gz file, revealed a bug in existing versions of cabal-install, when index files are cleaned up. This bug means that the `cabal update` command, which updates the hackage index file, will fail silently and leave the old file in place. It is easy to get things working again, but it requires manual intervention. Here is the most straightforward way to get things working again: On gnu/linux or mac: rm ~/.cabal/packages/hackage.haskell.org/01-index.* On windows: remove the same files, but from %appdata%\cabal\packages\hackage.haskell.org rerun `cabal update` to fetch a new 01-index. Apologies all for the inconvenience and any confusion this may have caused. There is a PR to fix this behavior in the works, but since the problem is on the client side, the fix will only improve the situations for new versions of `cabal`. Happy New Years to all, and cheers to a very functional 2018, Gershom p.s.: since the problem comes in unpacking the 01-index.tar.gz into the 01-index.tar, you can also just untar that file in place manually, or force cabal into doing the same by running `touch ~/.cabal/packages/hackage.haskell.org/01-index.tar`

2018-01-02 2:24 GMT+01:00 Gershom B
A recent update to hackage, which fixed up the 01-index.tar.gz file, revealed a bug in existing versions of cabal-install, when index files are cleaned up. This bug means that the `cabal update` command, which updates the hackage index file, will fail silently and leave the old file in place. It is easy to get things working again, but it requires manual intervention. [...]
Quick question: Are stack users affected, too, or only cabal users? I'm just asking because as a stack user you have ~/.stack/indices/Hackage/01-index.* files lying around, too...

On Tue, Jan 2, 2018 at 11:47 AM, Sven Panne
2018-01-02 2:24 GMT+01:00 Gershom B
: A recent update to hackage, which fixed up the 01-index.tar.gz file, revealed a bug in existing versions of cabal-install, when index files are cleaned up. This bug means that the `cabal update` command, which updates the hackage index file, will fail silently and leave the old file in place. It is easy to get things working again, but it requires manual intervention. [...]
Quick question: Are stack users affected, too, or only cabal users? I'm just asking because as a stack user you have ~/.stack/indices/Hackage/01-index.* files lying around, too...
Hey Sven, Gershom sent me an email about this earlier, and I looked into it. As far as I can tell, Stack is _not_ affected by this, since—although it uses the same hackage-security library as cabal-install—it follows a different codepath outside of hackage-security for downloading tarballs. I'm not 100% certain Stack is immune, however, so if someone notices a problem, please report it. Michael
participants (3)
-
Gershom B
-
Michael Snoyman
-
Sven Panne