Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
openwrt-bot opened this issue Aug 28, 2018 · 2 comments
Open

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

openwrt-bot opened this issue Aug 28, 2018 · 2 comments
Labels

Comments

@openwrt-bot
Copy link

luizluca:

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.

@openwrt-bot
Copy link
Author

por:

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

Correct?

@openwrt-bot
Copy link
Author

luizluca:

Yes and:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant