Subject: Game score and config file handling
To: None <tech-pkg@netbsd.org>
From: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
List: tech-pkg
Date: 12/02/1998 17:49:26
Following up the recent discussion, i'd like to offer the following
solutions for handling game score files and config files. The idea on both
is to keep them on deleting, and generate them only if they aren't already
present, with a little trick for config files:

 - for pkg_delete, do _not_ add the file (either score or config file)
 - for pkg_add/pkg's Makefile, do the following:
    * put an example config file somewhere (/usr/pkg/share/examples or so)
    * Check if the expected location for the config/score file already  
      has a file in place
    * if not, copy over the example file to the expected location or
      install from /dev/null, using install(1)'s -m, -o and -u options as
      appropriate.
    * if there's already a file present, do nothing (or at least not nuke
      it without asking/saving it somewhere/...)

The above steps need to be applied to all packages for consistency, and
also to get some halfways sane behaviour on pkg upgrading.
No, i'm not volunteering. 


 - Hubert

-- 
Hubert Feyrer <hubert.feyrer@rz.uni-regensburg.de>