The function preparePackageVersion is now responsible for doing
everything we need to do to be able to include the package in the index.
The function also returns a denormalised view of the package information
which can be taken as a proof that everything is consistent.
- Summary page has the list of all packages available (with details of the latest version)
- Timeline page has the list of all entries as they appear in the index
Also:
- Rebuild sdists is they are missing
Also introduce sanity checks for the following cases
- Package timestamp is later than any revision timestamp
- Package has no timestamp but has revisions
The above cases do not make any sense and are considered invalid.
Now the tarballs are downloaded only once but now each package name and
version is unpacked independently in its own directory. Then patches are
applied there.
Doesn't quite work because srcDir is unique by url, so if you have the
same url with different versions, things will collide. This is a bug
that might affect patching too.
1. Foliage takes as input a complete description of the index, where
source distributions and revisions come with a timestamp. This allows
us to recreate the entire index in a reproducible way.
2. Added a experimental command to import an index from a Hackage (as
downloaded with Cabal). This was originally a testing/development
need but there might be different use cases.