Bug 1516938
| Summary: | %ghost + %config leave the file behind after package removal | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Frantisek Kluknavsky <fkluknav> |
| Component: | rpm | Assignee: | Packaging Maintenance Team <packaging-team-maint> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 26 | CC: | ignatenko, mjw, packaging-team-maint, pmatilai, pmoravco, vmukhame |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-11-24 07:09:58 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Frantisek Kluknavsky
2017-11-23 15:50:47 UTC
Previous report at https://bugzilla.redhat.com/show_bug.cgi?id=1508376 Yes, this is known and actually expected behavior - from rpm POV that is. For the impatient: the only difference between %ghost and %ghost %config is that %ghost %config file will not be removed on package uninstall whereas a mere %ghost will. Whether it was originally intended to behave this way is lost in history (but see below), but the combination of %ghost %config is commonly used for files which you *dont* want to be removed along with the package, such as log files. Yes it's misuse of sorts of course (logs are not config at all), but this is such a long-standing behavior that it's commonly relied on, so changing the behavior risks people losing data. Perhaps the bigger problem is that this "quirk" isn't properly documented anywhere. %ghost %config is certainly a bit of an oxymoron because %config implies certain behavior which just don't make any sense at all with %ghost. Leaving %ghost %config alone does go in the spirit of %config in the sense that %config implies valuable data that you dont want to lose, and since the file is a %ghost any content that might be there is by definition "user" generated (as opposed to packaged). See https://github.com/rpm-software-management/rpm/commit/233e4573d1d21a36d06874fea6c594428033802e for further background - the former behavior seems to suggest this wasn't originally intentional but since it had the *effect* of preserving the file people started relying on it for the purpose. |