su, 2006-02-05 kello 13:01 +0100, Bart Martens kirjoitti: > An other way of looking at your (valid!) point about deleting empty > directories in time, is that there's no point in keeping an empty > directory on a list of files of a package being "removed". > > The attached patch is a variant of my previous patch. It still fixes > the bug, but it also does not keep empty directories "in use" for longer > than necessary.
Hm. I'm not sure this latest patch fixes the extra empty directories
situation correctly. There are a number of directories that are shared
between packages, but don't contain configuration files. For
example, /usr/share/bug (for reportbug "plugins"). It is not enough to
test "is the directory empty", since it may contain files that belong to
other packages. The correct test, I think, should be "does the directory
contain files belonging to this package". Am I right?
Incidentally, I'm attaching the script I'm using to test this dpkg bug.
To use, first create a chroot and install defoma and ttf-bitstream-vera
in it:
mkdir chroot
debootstrap sid chroot http://your.mirror/debian
sudo chroot chroot apt-get install defoma ttf-bitstream-vera
Then run "sudo ./test.sh" to test with default dpkg (the one in sid), or
give the name of a dpkg.deb that you've built yourself. The output is
hopefully self-explanatory.
--
When in doubt, use brute force.
test.sh
Description: application/shellscript

