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

Re: Patching a config file



"Joe Smith" <unknown_kev_cat@hotmail.com> writes:

> "Justin Pryzby" <justinpryzby@users.sourceforge.net> wrote in message
> news:20051030173739.GA18127@andromeda...
>> On Sun, Oct 30, 2005 at 06:00:48PM +0100, Danai SAE-HAN wrote:
>>> Package "freetype1-tools" owns a configuration file, namely
>>> /etc/ttf2pk/ttfonts.map.
>> It is a conffile, because it is contained in the package:
>
> That is an over simplification. It might not be a conf-file if it is
> included in the package, but in a different directory then where it is
> found wehn installed. (Like if the file is installed into
> /usr/share/*, and some postint magic is used to update the other copy
> of the file without clobbering user changes.)
>
> It is also theoretically possible that the package may backup the
> existing file, let dpkg clobber the existing file, and then do
> something in postinst to ensure user changes are recreated perhaps by
> use of a patch like system which will replace the new version with the
> users version if the changes cannot be reconcilled. This sort of
> example is admittedly unlikely, but AFAICT it is possible without
> violating policy.

That won't work right. On the next upgrade with a changed conffile pkg
will claim the package was modified by the user while in fact it was
modifed by the package. That is just wrong.

If you need to modify the file then don't make it a conffile. Create
it completly automatically, e.g. in /var/lib/package/, or make it a
configuartion file and use ucf.

MfG
        Goswin



Reply to: