Hi, On Tue, May 3, 2011 at 01:05, Jonathan Nieder <jrnie...@gmail.com> wrote: > forcemerge 316521 625241 > quit
And I thought I have checked the existing bugs ... probably used wrong keywords :(. Sorry for duplicate. > Hi, > > Ondřej Surý wrote: > >> I don't know whether it is real dpkg bug or not, but that's something >> I have found in php5 piuparts testing. >> >> Both php5-common and php5-cli (and other SAPIs) "owns" /etc/php5 >> (/var/lib/dpkg/info/*.list), now after >> >> dpkg --remove php5-cli >> dpkg --remove php5-common >> dpkg --purge php5-common >> dpkg --purge php5-cli >> >> the /etc/php5 is left in place because it was removed from >> /var/lib/dpkg/info/php5-cli.list (I guess on basis that another >> package - the php5-common still "owns" the directory). > > Sounds like Bug#316521 (dpkg: incomplete cleanup of empty > directories). > > One possible fix might be: > > - at removal time, if the number of packages owning a directory > decreases to zero, try to remove it. If that fails, keep > ownership, until That wouldn't work in this case: dpkg --remove php5-cli (2->1) # removing failed, ownership is not kept for php5-cli dpkg --remove php5-common (1->0) # removing failed, ownership is kept, but that's already the case dpkg --purge php5-common # removing failed dpkg --purge php5-cli # no ownership, removal not tried > - purge time, at which point if the number of packages owning > the directory has decreased to zero, try to remove it. dtto, php5-cli is not owning the directory at this moment. > I am hand-waving the "keep ownership" because I don't remember > what happens to .list files for removed packages. > > The above suggestion would still involve keeping empty directories > after packages are removed in some scenarios; the point would be to > make sure everything goes away at purge time, at least, to avoid > getting in piuparts's way, without regressing in the current cases > where directories are being correctly removed at removal time. At the moment the only solution I see is what I have suggested - keep ownership of whole tree up-to-the root for directories holding conffiles and try to remove them at purge time... dpkg --remove php5-cli # ownership kept for /., /etc, /etc/php5, /etc/php5/cli dpkg --remove php5-common # ownership kept for /., /etc, /etc/php5, /etc/php5/conf.d dpkg --purge php5-common # try to remove directories where ownership = 0 # i.e. remove /etc/php5/conf.d dpkg --purge php5-cli # try to remove directories where ownership = 0 # i.e. remove /etc/php5/cli, /etc/php5 > If anyone interested in working on this has any questions, please feel > free to let us know. I could work on that... O. -- Ondřej Surý <ond...@sury.org> http://blog.rfc1925.org/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org