Configuration file update behaviour change options
This is a request for discussion and suggestions.
At the moment, dpkg's behaviour wrt conffiles is fixed. That is to
say, it is preprogrammed with details of what to do in various
circumstances. However, the idea was that you would be able to change
This will become clearer with a bit more detail:
When dpkg is doing conffile update, there are four possible situations
it can encounter, each corresponding one of two answers to each of the
two questions `did the user edit their file' and `did the package
maintainer distribute a changed file'.
In each possible situation it can install or not install the file, or
it can prompt, with the default being to install or not to install, or
without a default.
We therefore have a grid, whose contents are currently:
distributed version distributed version
is same as last time has changed
user did not edit keep install
user did edit keep prompt, default is keep
The range of possible values for each `cell' is:
least likely to install keep
| prompt, default is keep
| prompt, no default
| prompt, default is install
most likely to install install
Currently a backup file (ie, a copy of the old file if we installed
the new one, or a copy of the new file if we didn't) is left iff a
prompt is issued. I think this behaviour should probably be retained
(if for no other reason than that setting it could make the options
even more complicated).
I'd like suggestions for a sane option syntax for allowing the person
who invokes dpkg to set these options.
The syntax should not allow the user to modify the `didn't edit, same
as last time' cell in the top left corner. It would be good if it
prevented the user from arranging that two cells A and B have contents
such that A is more likely to install than B, but where either A is in
the same row as B and to the left of it or in the same column and
below it. (Ie, the user having edited their file should not make it
more likely to be overwritten, and the distributor having edited their
version should not make it less likely to be installed.)
What I'm considering at the moment is something along the lines of a
chmod-like syntax where the letter on the left would refer to one or
more cells and the letter on the right would specify a change to or
value for the cell. For example, supposing that `n' is the top
right cell, `a' is all three settable ones, `p' is prompting and `i'
is installing the new one.
would set the top right cell to prompt with the default being to
install the new, and
would add prompting to all the cells, and turn the action that was
done without prompting in the top right and bottom left cells into the
This strikes me as generally not very satisfactory, but it's not clear
what a better solution would look like.
Schemes that prevent tuning of the behaviour cell-by-cell are I think
a bad idea.