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

2012-07-18 Thread Guillem Jover
reassign 273093 debian-policy
retitle 273093 policy: Document interactions of multiple clashing package 
diversions
severity 273093 wishlist
thanks

Hi!

On Thu, 2004-09-23 at 22:25:58 +0200, Frank Küster wrote:
 Package: dpkg
 Version: 1.10.23
 Severity: normal

 Feel free to reassign this to debian-policy if you think this isn't
 dpkg's fault...

Doing this now.

 If the two independent packages bar and baz both dpkg-divert the file
 /usr/share/foo/bla/brm of package foo, only one of both can get the
 diversion. And it will be the first package that can successfully
 register the diversion, the second will just get
 
 Unpacking baz (from .../apt/archives/baz_1.0-3_all.deb) ...
 Leaving `diversion of /usr/share/foo/bla/brm to /usr/share/foo/bla/brm.foo by 
 bar'
 Setting up baz (1.0-3) ...
 
 and even when bar is removed, no record is made that baz wanted to add
 it's own diversion.

This sould only happen if both diversions are idential, which would be
fine, but most commonly if two different packages divert a file then the
--package argument will be different which will make dpkg-divert error
out pointing out there's a clash with an existing diversion, and this
has (supposedly) been this way since the initial dpkg-divert
implementation.

 This can lead to unpredictable behavior, because it's just a matter of
 chance which package is installed first by a user. 

 It seems there is no mention of the problem in policy (or the
 developer's reference).  It also seems I don't like the diversion
 mechanism too much... Anyway, making this predictable and defined
 seems ;-) to be difficult, both by implementing checks and registries
 in dpkg, or by policy decisions. I have no proposal to make,
 unfortunately.

 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.

I don't see anything to fix here in dpkg, this is how diversions work,
that's just it. It could of course be documented more clearly in
policy, and for example mention that different packages diverting the
same file should Conflict with each other.

thanks,
guillem


--
To UNSUBSCRIBE, email to debian-dpkg-bugs-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



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

2012-07-18 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

 reassign 273093 debian-policy
Bug #273093 [dpkg] dpkg: Unpredictable behavior when two packages want to 
divert the same file
Bug reassigned from package 'dpkg' to 'debian-policy'.
No longer marked as found in versions 1.10.23.
Ignoring request to alter fixed versions of bug #273093 to the same values 
previously set
 retitle 273093 policy: Document interactions of multiple clashing package 
 diversions
Bug #273093 [debian-policy] dpkg: Unpredictable behavior when two packages want 
to divert the same file
Changed Bug title to 'policy: Document interactions of multiple clashing 
package diversions' from 'dpkg: Unpredictable behavior when two packages want 
to divert the same file'
 severity 273093 wishlist
Bug #273093 [debian-policy] policy: Document interactions of multiple clashing 
package diversions
Severity set to 'wishlist' from 'normal'
 thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
273093: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=273093
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


--
To UNSUBSCRIBE, email to debian-dpkg-bugs-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org