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.