Re: dotdee: a proposal for improving conffile management in Debian
Hi,
Dustin Kirkland wrote:
> DPKG INTEGRATION
>
> This approach would require some integration with dpkg itself. On
> package upgrade/installation, dpkg would need to need to detect when
> the target path of a file it wants to create/update is in fact a
> symbolic link referencing an /etc/dotdee path. It would need to drill
> down into that path and place the file it wants to write on top of the
> 50-dpkg-original file instead.
It sounds like this needs a hook to rename (divert) conffiles, plus a
hook to regenerate the combined conffile after "dpkg --configure"
finishes and before the package is considered configured.
(Of course, when I say "divert" this of course has nothing to do with
dpkg-divert. I am imagining something like
--conffile-name-filter=command
Set a command to be run via “sh -c” that maps
standard names of conffiles to the names of conffiles
dpkg should manage on the filesystem. This command
would receive a newline-separated [or NUL-separated?
-jn] list of filenames on its standard input and
should write a list of modified names to standard
input.
The intended use is by tools that want the pristine
conffiles managed by dpkg to be diverted to some other
place and used to write the actual conffiles in place.
Goes nicely with the --post-deferred-configure hook.
--post-deferred-configure=command
Set a command to be run via “sh -c” after conffiles
have been committed to disk but before the package
has entered the half-configured state. The intended
use is by tools that want to make some modifications
to changed conffiles before “postinst configure” runs.
Please do not take the details too seriously, of course.)
What do you think? Would you be interested in working on those
things? I imagine the result could be useful for other tools layered
on top of dpkg --- for example, it could be used to provide a nicer
interface for merging changes when /etc is kept in a VCS.
Hope that helps,
Jonathan
Reply to: