[Bug 1477125] [NEW] Enhanced handling of directories on package removing
Sworddragon
1477125 at bugs.launchpad.net
Wed Jul 22 12:41:08 UTC 2015
Public bug reported:
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/test/test.txt; chmod 0755 test/DEBIAN; echo Architecture:
"$(dpkg --print-architecture)"$'\n'Description: 0$'\n'Maintainer:
0$'\n'Package: test$'\n'Version: 0 > test/DEBIAN/control; dpkg-deb -b
test test.deb
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.
** Affects: dpkg (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dpkg in Ubuntu.
https://bugs.launchpad.net/bugs/1477125
Title:
Enhanced handling of directories on package removing
Status in dpkg package in Ubuntu:
New
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/test/test.txt; chmod 0755 test/DEBIAN; echo
Architecture: "$(dpkg --print-architecture)"$'\n'Description:
0$'\n'Maintainer: 0$'\n'Package: test$'\n'Version: 0 >
test/DEBIAN/control; dpkg-deb -b test test.deb
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/1477125/+subscriptions
More information about the foundations-bugs
mailing list