| Summary: | opkg conffile resolution cannot detect unmodified conffiles modified in upgraded package | ||
|---|---|---|---|
| Product: | [Yocto Project Subprojects] opkg | Reporter: | Richard Tollerton <rich.tollerton> |
| Component: | opkg | Assignee: | Alex Stewart <alex.stewart> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | major | ||
| Priority: | Undecided | ||
| Version: | unspecified | ||
| Target Milestone: | 0.4.5 | ||
| Hardware: | All | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
|
Description
Richard Tollerton
2016-01-19 18:28:03 UTC
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. |