I think those are created, when opkg has restricted to just overwrite changed config files during updates. Me personally, just review changes, apply to my configs If I find it usefull, and delete opkg ones.
I end up going through the opkg files to make sure my current configs aren’t missing something critical or sometimes there are new options that aren’t in the old config files that i would like to use.
I like the side by side comparison, so usually something like:
diff -y foris foris-opkg
It is kind of a pain in the neck, but sometimes it’s worthwhile.
I wouldn’t bother with them unless you’re having problems. They are created when upgrading packages, to debug problems - most Linux systems ask if you want to overwrite, discard, diff or merge configuration files when upgrading packages etc, but since Turris/openwrt runs on a router and upgrades will, in most cases, be completely unattended there’s no good way to ask what the user wants to do with the new config file - so it extracts it to -opkg in case you are having problems and want to merge your changes in to the new one.
Of course, auto-merging the new config with the old one would be ideal, but as far as I know there’s no way to do this currently (unless the install script inside the package does the migration manually).
Fair call. I’d really appreciate seeing some documentation as to who creates them when and why is all, I guess. They are mildly concerning when confronting a veil of ignorance like mine ;-). My assumption so far is, the -opkg ones are not used by anyone anytime, just there for reference, created sometime somewhen by some app with the Turris updater implicated, and opkg implicated, but a dearth of actual documented facts at hand?
As has been said, they are created by opkg (the package manager built-in to most OpenWrt routers) whenrading a package. I’m not sure there’s any proper documentation on this particular function, but you can find the source code for it here: https://git.lede-project.org/?p=project/opkg-lede.git;a=tree;f=libopkg;hb=HEAD