Re: should a postinst script create config files?
On Fri, Feb 22, 2002 at 11:52:09AM +0100, Maik Busch wrote:
> I allways answer No for new conffiles. Then dpkg installes a
> conffile.dpkg-dist file. The changes I made for the old conffile are
> saved in a file generated with 'diff -u conffile.dpkg-dist conffile'.
> That patch I try to apply to the new dpkg-dist file. Then I make a new
> diff and save it for the next update.
>
> If I make a change in conffile a cron job daily reports me that there is
> a change but no existing diff for that.
>
> To support that I have written /etc/cron.daily/patchdb and
> /usr/local/sbin/patchdb-checkin. It is appended to that mail. Some
> comments are in german - sorry - but the scripts are not so big. The
> generated output is in english.
So essientially you do, what I believe is called a three way merge
operation. Do you have many problems with conflicts?
Hmmm. What dpkg really needs is a user defined script that runs when
installing a conffile (whether different or not).
That way system adminstrators can decide what happens, eg:
1. current behavour, with option to edit file.
2. use three way merge:
1) diff conffile.dpkg-dist conffile.
2) install new conffile as conffile.
3) apply patch to conffile (assuming differences exist).
4) save copy of installed conffile to conffile.dpkg-dist.
5) allow adminstrator to fix up any conflicts.
or would this be better (don't know)?
3. use three way merge:
1) diff conffile.dpkg-dist $newconffile
2) apply patch to conffile (assuming differences exist).
3) save copy of installed conffile to conffile.dpkg-dist.
4) allow adminstrator to fix up any conflicts.
One applies the debian patch to your copy, the other applies your patch
to the debian copy.
How does ucf work?
Reply to: