Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 169457 - upgrade/reinstall removes empty directories
Summary: upgrade/reinstall removes empty directories
Status: RESOLVED DUPLICATE of bug 16162
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-05 14:25 UTC by ic+gentoo
Modified: 2007-03-06 17:11 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 ic+gentoo 2007-03-05 14:25:49 UTC
When I install a package that has some empty directories, they are created in the filesystem. However, when the package is updated or reinstalled, those empty directories are removed. This is inconsistent.

Reproducible: Always

Steps to Reproduce:
1. emerge -C hal ; rm -rf /etc/hal
2. emerge -1 hal ; ## directory /etc/hal exists with its subdirectories
3. emerge -1 hal ; ## directory /etc/hal doesn't exist anymore



Expected Results:  
After step 3, the empty directory tree in /etc/hal should not be removed.

emerging hal is just an example, probably there are a lot other examples. I doubt there is a quick workaround, it's the ebuild philosophy with empty directories that is wrong (IMO).
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-03-05 14:34:50 UTC

*** This bug has been marked as a duplicate of bug 16162 ***
Comment 2 Zac Medico gentoo-dev 2007-03-05 17:46:23 UTC
(In reply to comment #0)
> Expected Results:  
> After step 3, the empty directory tree in /etc/hal should not be removed.

That's what keepdir is for (see `man 5 ebuild`).
Comment 3 SpanKY gentoo-dev 2007-03-06 17:11:25 UTC
keepdir should only be for keeping a directory after a package is removed completely

in the upgrade/reinstall path, portage should not be cleansing empty dirs ... but that's tracked in Bug 16162