From what I can tell, collision detection currently runs before pkg_preinst. I am using pkg_preinst to remove what was previously a symlink and will now be a directory but despite this, collisions are still reported. I encountered this while working on jruby but I imagine it could happen elsewhere. I therefore think the collision detection should run after pkg_preinst.
Crap, sorry, hit refresh by mistake.
*** This bug has been marked as a duplicate of bug 233278 ***