[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#273093: Unpredictable behavior when two packages want to divert the same file

Jonathan Nieder <jrnieder@gmail.com> 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
isn't implemented.

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 (rra@debian.org)               <http://www.eyrie.org/~eagle/>

Reply to: