Enhanced handling of directories on package removing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dpkg (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I'm using Ubuntu 15.10 dev with dpkg 1.17.25ubuntu1 and if I'm removing a package I'm noticing that dpkg does remove empty directories even if they weren't created by the related package. Here is an example:
Test-package creation: mkdir -p test/DEBIAN; mkdir -p test/tmp/test; touch test/tmp/
If the installation directory gets created before installing and then removing the package it gets deleted too for example with this command: mkdir /tmp/test; dpkg -i test.deb; dpkg -r test
Maybe dpkg can be enhanced to avoid this situation. Also if a directory would contain "garbage" files before removing the related package dpkg will print a warning that the directory can't be removed but this information isn't logged. Maybe both situations could be solved with a simple database that keeps track of these states.