Re: Bug#273093: Unpredictable behavior when two packages want to divert the same file
Jonathan Nieder <firstname.lastname@example.org> writes:
> To be clear, which of the following is this report proposing?
> * Packages diverting the same file should conflict.
My understanding of what Guillem said is that we should say this. You
can't actually have two different diversions of the same file at the same
time, so two separate packages can't both divert the file. If they do,
you end up with a situation (even if you avoid the package conflict) where
one of those two packages could be removed, removing the diversion, and
then putting the system in an inconsistent state for the second package.
In order to safely divert the same file in multiple packages, you would
need diversions that would stack and could be separately unwound, and that
So a diversion in essence becomes like a file installed on the system:
only one package can own it at a time, so packages that want to divert the
same file have to conflict. What, for example, the various proprietary
video drivers do is that they all share a utility package that manages the
diversions for all of those packages so that the diversion code isn't
duplicated in multiple packages.
> * Packages should not divert a file unless that file is "divertable".
> To make a file divertable, the maintainer of the package shipping
> it adds a comment to debian/control mentioning the filename and
> which packages are allowed to divert it.
I don't think the bug report was asking for more formality around the
coordination with the package maintainer part.
Russ Allbery (email@example.com) <http://www.eyrie.org/~eagle/>