You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cabal update fails: 01-index.tar: setModificationTime:setFileTimes: does not exist #4987
After removing the *index* tarballs from the ~/.cabal directory, cabal-install at d7a88c6 fails to recover during update:
$ cabal update
Downloading the latest package list from hackage.haskell.org
/home/simons/.cabal/packages/hackage.haskell.org/01-index.tar: setModificationTime:setFileTimes: does not exist (No such file or directory)
Btw, even removing only the 01-index.tar while leaving 01-index.tar.gz in place is something that cabal update doesn't recover from; this is why my travis ci script (which removes the redundant .tar before commit to the cache), has to manually restore the unpacked .tar; I never got around to teach cabal to auto-recover in this case.
Even deleting all 01-index* files doesn't help cabal recover.
In that case, the error is:
Warning: Could not set modification time of index tarball --
/Users/lucian/.cache/cabal/packages/hackage.haskell.org/01-index.tar:
setModificationTime:setFileTimes: does not exist (No such file or directory)
Package list of hackage.haskell.org is up to date.
The index-state is set to Unknown or invalid timestamp.
Only after I also deleted timestamp.json and snapshot.json, cabal was able to generate a new index.
So that tells me that all these files need to be treated as a whole. If any of them breaks, the index breaks.
Activity
peti commentedon Jan 1, 2018
Workaround: run
rm *.*in to wipe out all files from~/.cabal/packages/hackage.haskell.orgthat contain state.hvr commentedon Jan 1, 2018
Btw, even removing only the
01-index.tarwhile leaving01-index.tar.gzin place is something thatcabal updatedoesn't recover from; this is why my travis ci script (which removes the redundant.tarbefore commit to the cache), has to manually restore the unpacked.tar; I never got around to teachcabalto auto-recover in this case.LucianU commentedon Apr 25, 2024
Even deleting all
01-index*files doesn't helpcabalrecover.In that case, the error is:
Only after I also deleted
timestamp.jsonandsnapshot.json,cabalwas able to generate a new index.So that tells me that all these files need to be treated as a whole. If any of them breaks, the index breaks.