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

2012-07-18 Thread Frank Kuester
Russ Allbery  writes:

> Jonathan Nieder  writes:
>
>> To be clear, which of the following is this report proposing?
>
>>  * 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.

I remember having opened the bug report, but not what was the real
problem I had come across, nor my opinions on a solution.  

I don't think today that policy should require such a formalism.
However, it is good practice to consult the maintainer of the "diverted"
package. Therefore, in particular in team-maintained packages, I do
think that a list "I expect this and that file to be diverted, please
ask before doing anything else" somewhere in the debian directory might
be a good idea.

Regards, Frank


-- 
To UNSUBSCRIBE, email to debian-dpkg-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87fw8opy3z@riesling.miltenberg.kuesterei.ch



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

2012-07-18 Thread Russ Allbery
Jonathan Nieder  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 (r...@debian.org)   


-- 
To UNSUBSCRIBE, email to debian-dpkg-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87txx4kczi@windlord.stanford.edu



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

2012-07-18 Thread Jonathan Nieder
Hi,

In 2004, Frank Küster wrote:

> And while we're at it, and a copy goes to debian-policy@l.d.o,
>
> ,
> |  You should not use `dpkg-divert' on a file belonging to another
> |  package without consulting the maintainer of that package first.
> `
>
> Not only that a warning about multiple diversions is missing here:
> This should be noted down somewhere in the source package. There are
> NMUs, packages are orphaned etc., and information like this can easily
> be lost.

To be clear, which of the following is this report proposing?

 * Maintainer scripts must pass "--package" to dpkg-divert when
   creating or removing diversions and must not use "--local"
   (documented in 2010).

 * Packages diverting the same file should conflict.

 * 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.

 * Something else (?)

Thanks and hope that helps,
Jonathan


--
To UNSUBSCRIBE, email to debian-dpkg-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120718203306.GA13423@burratino