Sometimes it's needed to update a single file in a package without rebuilding it completely and requiring users to fetch a big tarball.
I think we could add one more number after pkgrel, let's call it fixrel (from "fix release"). Normally, each package pkgver-pkgrel version should have fixrel set to 1 and contain all the files. However, when one wants to fix some small bug, he manually creates a tarball containing only the fixed file(s) and sets fixrel to >1. pkg then will fetch all fixes for given pkgver-pkgrel tuple, starting from 2, and install them incrementally. When there's new pkgver-pkgrel package version, fixrel counter is resetted to 1 and such package should be used for installation/upgrade.
Some restrictions/notes for fixrel>1 packages:
- contents of tarball will be installed by simple tar -C / -xzf ...
- can't contain any /.* files, except for /.FIX script which will be run once and deleted
- pkg will automatically save current fixrel in /var/pkg/<package>/fixrel
Notes:
- package tools should check when installing a fixrel>1 package if the fixrel=1 (full) package is already installed