[Pkg-lyx-devel] svn commit: r405 - in /lyx/trunk/debian: changelog lyx-common.preinst

Per Olofsson pelle at dsv.su.se
Mon Dec 10 13:32:23 UTC 2007


Sven Hoexter wrote:
> On Mon, Dec 10, 2007 at 09:46:12AM -0000, hoaxter-guest at users.alioth.debian.org wrote:
> 
>> --- lyx/trunk/debian/lyx-common.preinst (added)
>> +++ lyx/trunk/debian/lyx-common.preinst Mon Dec 10 09:46:11 2007
>> @@ -1,0 +1,7 @@
>> +#!/bin/sh -e
>> +
>> +if [ -f /etc/lyxrc ]; then
>> +    rm -f /etc/lyxrc
>> +fi
>> +
>> +#DEBHELPER#
>>

Not such a good idea.

> Note: I'm not sure if it's the right way to do it. If I had a personal lyxrc
> file I would be pissed if it gets simply removed.
> Making a .bak copy or something like this could be an option in conjunction
> with a md5sum comparison to check if someone ever touched it.

Yes, this how it should be done - only remove the file if the md5sum matches.
Otherwise just print a note to the user "not removing config file because it has
been modified ..."

It's described here: http://wiki.debian.org/DpkgConffileHandling

However, I need to check why I removed lyxrc - I can't remember.

> Another option could be to only remove it on a purge in the postrm script but
> that would still leave us with an undefined number of systems with a lost file
> which isn't owned by any package. That in turn makes it hard to remove this
> workaround from the postrm script later.

It should probably be removed on purge even if the user has modified it.

> Adding a debconf dialog to ask the user if we should remove it would be
> overkill I guess.

Yes.

-- 
Pelle



More information about the Pkg-lyx-devel mailing list