[Soc-coordination] Declarative Diversions - Report 1

Goswin von Brederlow goswin-v-b at web.de
Sat Jun 11 07:03:14 UTC 2011


Steve Langasek <vorlon at debian.org> writes:

> On Sat, Jun 04, 2011 at 07:29:02AM +0200, Luk Claes wrote:
>> > -----------------------------
>> > Details - Control File Syntax
>> > -----------------------------
>> > It will conform to RFC2822 style with the following format:
>> >  * Divert-From:
>> >  * Divert-To:
>> >  * Blank lines and lines beginning with '#' will be comments
>> >  
>> > 'Divert-To' will be optional and if it is ommitted then files being
>> > diverted 
>> > will have their filename changed to 'file.distrib'
>
>> Would it not be better to have the filename changed to
>> 'file.<package_name>' if 'Divert-To' is not specified, so it's possible
>> to support more packages diverting the same file?
>
> If you do that, how do you keep track of which package's file was diverted
> where, so that on *removal*, the files are put where they belong?

Because dpkg would record the name in its database in the "Divert-To"
slot. It already needs to know the name in the case Divert-To was
specified so this doesn't make it more complex.

> Why do you *want* to have parallel diversions of the same file by more than
> one package?  It may seem the answer is obvious, but if you think about it I
> believe you'll find those semantics aren't actually useful.  *Nested*
> diversions can be useful (one package diverts foo to foo.distrib and wraps
> it; another package diverts foo.distrib to foo.distrib.distrib and wraps it
> again), but having two diversions happen in parallel, where the unpack order
> determines which package ends up on top, isn't useful at all.

One use for this would be to later merge in alternatives.

Think about it. What are alternatives? Some packages all provide the
same file and based on priority or users choice one of them wins out and
gets to use the name. One minor change that would probably be usefull
for alternatives would be to allways store the "file" as
"file.<package_name>" even for the package that gets picked to provide
"file".

MfG
        Goswin



More information about the Soc-coordination mailing list