OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
  • Task Type Feature Request
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Luiz Angelo Daros de Luca - 28.08.2018

FS#1821 - Avoid conf-opkg when package config files hasn't change


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)
   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.

Paul Oranje commented on 28.08.2018 14:11

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


Luiz Angelo Daros de Luca commented on 28.08.2018 16:45

Yes and:

c) don't create a <config>-opkg file when old pkg and new pkg config file are the same, even when config file is modified


Available keyboard shortcuts


Task Details

Task Editing