Today, during a package installation, opkg checks if a config file exists in rootfs.
If it does not match hash from package, it saves the new file with a config-opkg suffix.
Would it be possible, during a package update check if the old version hash match and avoid
creating the config-opkg file? Something like:
if old_pkg.hash(config) == new_pkg.hash(config)
if not fs.exists(config)
if fs.hash(config) == new_pkg.hash(config)
It would be even better if the /usr/lib/opkg/status somehow could be temporary saved between system upgrades to feed
old_pkg.hash(config) function. If config hashes lived outside status (like inside /usr/lib/opkg/info/pkg.conffiles), one
could simply add these files to backup. old_pkgs.hash will simply read /usr/lib/opkg/info/pkg.conffiles before it is overwritten
by the new version.
The text was updated successfully, but these errors were encountered:
So, you propose (rephrased):
a) replace old config file with new config file provided by upgraded package when the old hasn't been changed since its installation.
b) make that work also post sysupgrade