Skip to content

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

Open

Description

@peti

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)

Activity

  1. peti commented on Jan 1, 2018

    @peti
    CollaboratorAuthor

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

  2. hvr commented on Jan 1, 2018

    @hvr
    Member

    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.

  3. LucianU commented on Apr 25, 2024

    @LucianU

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions