Having run into this issue also, I must note that this behaviour of dpkg 
contradicts their FAQ:

https://wiki.debian.org/Teams/Dpkg/FAQ#Q:_Will_dpkg_replace_a_symlink_with_a_directory_or_vice_versa.3F

Q: Will dpkg replace a symlink with a directory or vice versa?
A: No. As dpkg does not currently track file metadata, it does not know if a 
symlink or directory was switched by a previous package or by the sysadmin. As 
part of the dpkg credo, preserving human configuration is of utmost importance, 
and this kind of change has always been considered as so.

As of now, this should be handled by the package maintainer scripts (possibly 
with aid from dpkg-maintscript-helper), failing to do so should be considered a 
serious bug.

Reply via email to