Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 164765 - CONFIG_PROTECT behavior change
Summary: CONFIG_PROTECT behavior change
Status: RESOLVED DUPLICATE of bug 8423
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-01 01:07 UTC by Kaiting Chen
Modified: 2008-11-26 18:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kaiting Chen 2007-02-01 01:07:36 UTC
In the latest version portage-2.1.2-r5 at least, but possibly sooner, the CONFIG_PROTECT behavior has changed I believe. It no longer protects the files in /etc from removal. At least on my system, if I emerge -C mailbase, then /etc/mailcap gets removed. In previous versions it was cfgpro'd.

The problem is that there are sometime empty directories that get removed on upgrade. Try upgrading cups or hal, the directories they create in /etc get removed after the upgrade. Either keepdir them or fixing portage would probably be the proper solution.

Reproducible: Always

Steps to Reproduce:
Comment 1 Kaiting Chen 2007-02-01 03:13:12 UTC
I was thinking that there might be an easy fix for this that would fix pretty much every other "package upgrade removes directory; my program doesn't work anymore" bug out there.

When unmerging a package, if portage finds an empty directory, it should check to see if another package owns the empty directory. If one does, then the directory should be left alone.

The thing is though, portage only really needs to check packages WITH THE SAME NAME (this should take care of 99% of cases). Therefore, instead of having to go through 500 packages on a fully prepped system, portage only usually needs to check 1 or 2 packages to see if they own the empty directory.

Anyways, regarding remove regular files in /etc, I guess it isn't all that important because if you really had some important configuration in it, then the mtime would be different and it wouldn't get removed anyway.

Therefore, I think I'm going to try to write a patch implementing the empty directory check I was describing. If anyone has any useful suggestions about this, please let me know.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-02-01 06:35:46 UTC
(In reply to comment #0)
> In the latest version portage-2.1.2-r5 at least, but possibly sooner, the
> CONFIG_PROTECT behavior has changed I believe.

Not a bug, that's intended.

> The problem is that there are sometime empty directories that get removed on
> upgrade. Try upgrading cups or hal, the directories they create in /etc get
> removed after the upgrade. Either keepdir them or fixing portage would probably
> be the proper solution.

Then file bugs about those ebuilds, not about portage.

*** This bug has been marked as a duplicate of bug 8423 ***
Comment 3 Audiodef 2008-11-26 18:08:16 UTC
Why is that intended? Just curious, but would really like to know, just to understand how it's supposed to work.