Re: Upcoming Debian Releases
On 7 Jun 1997, Kai Henningsen wrote:
> > > Or maybe you have forgotten how conffiles are actually handled:
> > >
> > > (old=original install, new=this install, current=possibly edited version)
> > >
> > > If old md5 = new md5, ignore new file (package unchanged)
> > > If old md5 = current md5, install new file (conffile was not edited)
> > > otherwise, prompt (both changed)
> > >
> > > Your change would mean that in case 2, dpkg would have to figure out how
> > > to put the variables from the old script into the new one.
OK. I didn't make this clear. The point of the config-tool is to do this.
The file is not modified locally per s.e., just written locally in a
different way to the packaged version, because the config db is changed.
To clear it up: for a script which holds values which are really housed in
the configuration database, each line which is simply a copy of config db
information has a special key on it ("# nomd5sum" or something) which
tells dpkg not to include that line in its config-file md5sum. The config
db tool has the job of updating the values "on demand", from the config
database, replacing the values in the script. Therefore, when a file gets
upgraded, even if it is replaced with "standard defaults" from the
package, the postinst calls the config tool telling it to copy the
appropriate values into the file.
We could have something like this in the postinst:-
if [ -f /sbin/debian-configtool ]; then
debian-configtool --import /default - --update-file /etc/my.script <<EOF
Then /etc/my.script looks like:-
SOME_VARIABLE=yes # configtool=yes
(See my post to debian-admintool about the significance of /default).
The point of making dpkg ignore config-tool lines is that they are not
supposed to be modified separately from the config database locally.
> No, it doesn't. You forget that there are three md5 sums / file versions
> involved, not two - *even though you quote me explaining it*!
Well, I already wrote a simple system that works like this in perl - and a
modified version of md5sum which can do this.
Tom Lees <email@example.com> http://www.lpsg.demon.co.uk/
PGP ID 87D4D065, fingerprint 2A 66 86 9D 02 4D A6 1E B8 A2 17 9D 4F 9B 89 D6
finger firstname.lastname@example.org for public key (also available on keyservers)
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
Trouble? e-mail to email@example.com .