[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ignoring updates to a conffile?

* Matt Zimmerman (mdz@debian.org) [031228 22:25]:
> On Sun, Dec 28, 2003 at 05:04:54PM +0100, Andreas Barth wrote:
> > A rather problematic issue is on upgrades from a previous package
> > where the previous one had it as a conffile. I think about the
> > following: Just removing this file in the deb, and then do in
> > postinst:
> > if [ ! -a file -a -a file.dpkg-old ]; then
> >   mv file.dpkg-old file;
> > fi
> > 
> > if [ ! -a file ]; then
> >   cp template file;
> > fi

> I think you mean "-f" for most of those "-a". 

I don't mean "-f", because a symlink is also ok. (But I do perhaps
mean a "-f file -o -h file" or "-r file".)

> You should not be touching
> anything ending in .dpkg-*.  The copy seems reasonable, but the mv is
> unnecessary and should be omitted.  When the package is upgraded from a
> version with the conffile to a version without the conffile, the actual
> config file on the system remains, and should be left in place.

Ah, ok. I thought that on removing the file from the package, dpkg
asks also to remove the file from the filesystem (and removes it so to
file.dpkg-old). If that is not the case, I can of course omit the
first if ... fi.


   PGP 1024/89FB5CE5  DC F1 85 6D A6 45 9C 0F  3B BE F1 D0 C5 D1 D9 0C

Reply to: