Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cabal update fails: 01-index.tar: setModificationTime:setFileTimes: does not exist #4987

Open
peti opened this issue Jan 1, 2018 · 3 comments

Comments

@peti
Copy link
Collaborator

peti commented Jan 1, 2018

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)
@peti
Copy link
Collaborator Author

peti commented Jan 1, 2018

Workaround: run rm *.* in to wipe out all files from ~/.cabal/packages/hackage.haskell.org that contain state.

@hvr
Copy link
Member

hvr commented Jan 1, 2018

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.

@LucianU
Copy link

LucianU commented Apr 25, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants