Summary: | CONFIG_PROTECT during unmerge is redundant | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Jason Stubbs (RETIRED) <jstubbs> |
Component: | Core | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | greg_g, heldhelm, williamh |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
List of cruft left behind when unmerging
Patch to ignore CONFIG_PROTECT when unmerging |
Description
Jason Stubbs (RETIRED)
2004-02-27 00:29:23 UTC
Created attachment 26449 [details]
List of cruft left behind when unmerging
I had to manually trim of files that should be in /etc even though they are not
owned by installed packages. The real list for my computer may actually be
larger.
Created attachment 26450 [details, diff]
Patch to ignore CONFIG_PROTECT when unmerging
I don't think portage should delete files under /etc automatically. My idea is to make /etc/.delete0000_filename file during unmerging. (It's similar with ._cfg0000_filename but it would be empty) Then, we could real delete it by some tools like etc-update or dispatch-conf etc. That's a good idea, too. Another possibility is deleting only if a new FEATURES flag is set. I'm sure that there are probably some situations where deleting an unmodified configuration file could be detrimental but I can't think of any. The main problem is that there is no way to track what's left behind once a package has been unmerged. Any solution that deals with that is fine by me. > I'm sure that there are probably some situations where deleting an unmodified
> configuration file could be detrimental but I can't think of any.
Reading your patch i think i've seen one:
- foobar-1.0 installs /etc/foobar.conf
- you never edit that file
- you upgrade to foobar-1.1, it adds /etc/._cfg0000_foobar.conf
- /etc/foobar.conf is removed during foobar-1.0 autoclean, and you
won't have a foobar config at all until your next etc-update.
There would be at least two solutions to this issue:
- either makes portage overwrite the unmodified /etc/foobar.conf
instead of creating an /etc/._cfg0000_foobar.conf (then it wouldn't be
autocleaned since mtime/md5 would be new ones). This can be done safely
after checking the /var/cache/edb/config, but the drawback if that users
won't see what's new in the default config files they are using.
- or you could remove config files only when the action is a real "unmerge"
but not a simple "clean" (the 'trimworld' parameter of the unmerge function
should be okay to get this information from emerge).
|