• Herbert Valerio Riedel's avatar
    Store secure repo index data as 01-index.* (#3862) · dc889b17
    Herbert Valerio Riedel authored
    "Secure" cabal repositories use a new extended & incremental
    `01-index.tar`. In order to avoid issues resulting from clobbering
    new/old-style index data, we save them locally to different names.
    With this patch, secure repos generate/update the files below on `cabal update`
    - `01-index.cache`
    - `01-index.tar`
    - `01-index.tar.gz`
    - `01-index.tar.idx`
    - `mirrors.json`
    - `root.json`
    - `snapshot.json`
    - `timestamp.json`
    ...while the legacy codepaths for non-secure repos operate on the files
    - `00-index.cache`
    - `00-index.tar`
    - `00-index.tar.gz`
    - `00-index.tar.gz.etag`
    This way the old/new codepaths don't interfere with each other anymore.
    Note: The format of `01-index.cache` file will be extended by the upcoming `--index-state` feature
    This trivially fixes #3854
IndexUtils.hs 26.5 KB