[Soc-coordination] Declarative Diversions - Report 1
Luk Claes
luk at debian.org
Sat Jun 4 05:29:02 UTC 2011
On 06/04/2011 12:47 AM, Sam Dunne wrote:
> DECLARATIVE DIVERSIONS
> ======================
> ------------
> Introduction
> ------------
> A diversion is when it is possible to have dpkg not overwrite a file
> when it
> reinstalls the package it belongs to, and to have it put the file from the
> package somewhere else instead.
>
> Declarative diversions involves a new control file with a declarative
> syntax which dpkg will parse and process directly as part of the package
> unpack
> and removal phases, eliminating the problems resulting from non-atomic
> handling of diversions.
Will it also solve the problem that currently diversions only really
work when no more than 2 packages are involved?
> ------
> Topics
> ------
> There are a number of topics involved in implementing this kind of project
>
> * What syntax do we use for the new control file?
> * What dpkg does with the control file
> * How do we handle diversions to a non-existant directory?
> * How do we order unpacking a new package which adds a diversion?
> * How do we order removing a package which had a diversion?
> * How do we handle errors?
> * What happens to dpkg-divert?
* What happens when 3 or more packages divert the same file/directory?
> -----------------------------
> 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?
Cheers
Luk
More information about the Soc-coordination
mailing list