tech-pkg archive

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

Re: unmodified configuration file that should not be removed



On 9. 2. 2012, at 13:10, Manuel Bouyer wrote:

> Hello,
> I'm working on a package which has a special file that I do not know
> how to handle. This file contains a version of the data structure
> used by the software. On a first install, this script is generated
> automatically. On subsequent install this file is not overwritten,
> so that the software can deal with older data format.
> 
> How do we deal with this in pkgsrc ?
> Adding it to the PLIST will cause it to be removed at pkg_add -u time,
> which is not what we want.
> Dealing with it using CONF_FILES or SUPPORT_FILES will have the same
> problem, as this file should not be changed after install.
> 
> I think at make install time, this file should be generated in
> share/example, and pkg_add should copy it to the right location if
> it doesn't already exists; pkg_delete should never remove it.
> How can I do this ?

If the file's part of CONF_FILES and the checksum changes, it should never be 
deleted/overwritten by any subsequent package removal/install. How about an 
INSTALL script that deliberately touches the file in order to change its 
checksum? It's a little on the dirty side, but probably the easiest way right 
now.

-F


Home | Main Index | Thread Index | Old Index