being able to specify an alternative APKINDEX?
In my downstream build system I would like to implement staging support. That means if there is a package update and the build system detects a SONAME change over a previous version, and there are other packages in the repo (or possibly multiple repos, e.g. changes in main should also stage contrib) that still depend on the old version, the new packages should go into staging index first. The advantage of this should be that external users of the repository do not see updates until the repositories are clean; a side effect is that the build system should be able to reliably tell you if you still have packages that need rebuilding.
The behavior should be something like this:
- an updated package is built
- soname change detected: inspect existing indexes for dependencies, if dependencies detected, keep old index as is, and reindex using a staging index
- the staging index keeps existing for as long as there are packages depending on the old soname
- once all packages are rebuilt, staging index becomes main index
- the catch is, everyone installing from the repository should see the old index with the old packages, while the build system should use the staging index to install
makedependsand the likes
This has potential workarounds, like temporarily moving around the indexes for
makedepends installation and so on, but this is racey (something from the outside could catch the staging index while
makedepends installation is in progress)
If I could specify an alternative index path, i could name the staging index like
APKSTAGE.tar.gz for example, and use that for all
apk operations done within the build system, and I could implement the logic manageably.