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.
We get this suggestion occasionally but it's simply not what pkg_preinst is designed for, and one of the features of collision-protect is that it prevents any modifications to the live filesystem (pkg_preinst is allowed to modify the live filesytem). Since pkg_preinst won't work, we'd have to introduce a different phase that has different characteristics (as part of an EAPI version bump).
*** Bug 233289 has been marked as a duplicate of this bug. ***
*** Bug 233291 has been marked as a duplicate of this bug. ***
I don't understand your point. What is the point of running collision-protect before pkg_preinst if it doesn't detect any "collisions" that may be caused by it?
I think this is not a PMS bug, as grepping PMS for 'collision' finds nothing.
Rather than overload pkg_preinst, it should be a separate phase that's specifically for the purpose of resolving collisions.
Does anyone still want to work on this? I think COLLISION_IGNORE is 'good enough', and having extra phase just to work around this would be overkill. If someone does, please resume the discussion. Otherwise, WONTFIX.
I'm personally not fussed any more, my need for this has long passed.
Then closing it as no longer wanted. The overhead of adding a new phase for resolving collisions seems to be unwarranted, considering that simple COLLISION_IGNORE variable handles most of the cases and FEATURES=protect-owned even more.