On package upgrade, resolve_conffiles (opkg_install.c, http://git.yoctoproject.org/cgit/cgit.cgi/opkg/tree/libopkg/opkg_install.c?id=7885da3974de2df1baba220200d55920fb530e25#n770) checks whether or not the new conffile should be renamed to *-opkg by comparing the md5sum of the currently existing conffile with the md5sum of the *new* package version. The conffiles of the old package version are not queried. This means that it can't detect if a conffile has not been modified. If the conffile changed in the new version of the package, it still gets renamed to *-opkg, even if the file wasn't changed on disk. To reproduce, AFAIK: - Install a package containing a conffile - Edit the source conffile - Bump the version number - Rebuild the package - Upgrade to the new package version
Re-targeting in preparation for 0.4 release
I haven't been able to reproduce this issue. I've pushed a regression test here[1] that I think should reproduce, using the steps that Rich has provided, but opkg seems to do the right thing. When the conffile contents changes in v2, the conffile is replaced wholesale. When you modify ("locally") the conffile between upgrades, opkg prints the appropriate info and saves the v2 conffile as `issue8947-a.conf-opkg` instead of overwriting the local copy. [1] https://gitlab.com/astewart.49c6/opkg/-/blob/b690d6dc4accfb05eb317b367d636038e4645333/tests/regress/issue8947.py I know it's been a while, but do you have any more insights Rich? >On package upgrade, resolve_conffiles (opkg_install.c) checks whether or not the new conffile should be renamed to *-opkg by comparing the md5sum of the currently existing conffile with the md5sum of the *new* package version. resolve_conffiles() is called *after* the new package's conffiles have been copied into place. The MD5SUM comparison to determine if there have been local modifications is done by backup_modified_conffiles() [2]. [2] https://git.yoctoproject.org/cgit/cgit.cgi/opkg/tree/libopkg/opkg_install.c?id=e544c04eeadec7ade2c58c7be506acafb011a4a9#n342
I only precisely recall that I filed this after talking with Alejandro about it. It was always a somewhat aspirational bug report. If the code disagrees, close this.
OK. In that case, I'll close this as not-reproducible. If anyone runs into a similar issue, please file a new bug and (ideally) create a reproducing case in the regression tests.