On Fri, Feb 26, 2016 at 04:52:40PM +0900, Mike Hommey wrote: > reassign 815969 dpkg > thanks > > dpkg maintainers: See discussion in bug 809386.
So, here is my take at what's going wrong here: dpkg-maintscript-helper, which is run during preinst per debhelper, is called with rm_conffile, but what that actually does, according to the dpkg-mainscript-helper man page, is rename the files to .dpkg-remove. Then dpkg tries to remove the directories during the unpack phase, but fails doing so because they still have those .dpkg-remove files. Then the postinst executes dpkg-maintscript-helper again, which removes the .dpkg-remove files, and leaves the empty directories. One could work around that by adding some more rmdirs in the postinst, but really, should every package using dpkg-maintscript-helper rm_conffile have to do that? Mike