Avoid conf-opkg when package config files hasn't change
Username: Luiz Angelo Daros de Luca
Origin: https://bugs.openwrt.org/index.php?do=details&task_id=1821
Hello,
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:
foreach config if old_pkg.hash(config) == new_pkg.hash(config) continue if not fs.exists(config) fs.save(config) if fs.hash(config) == new_pkg.hash(config) continue fs.save(config+"-opkg")
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.