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

scores file - how to fix?



I've been looking at how to change my packages to conform to the "new"
standard. I was one of those nasty, bad people who tagged scores files as
conffiles. I believe this is how to fix it:

preinst:  when called with "upgrade old-version", check to see if the
          old-version was a "broken" package. If it was, copy the
          scores to a temporary location (e.g. "cp $SCORE $SCORE.tmp" )

postinst: if $SCORE.tmp exists, "mv $SCORE.tmp $SCORE". Always do
          "touch $SCORE; chown root.games $SCORE; chmod 0664 $SCORE"

This should keep the old scores around if they exist. It always creates a
scores file with the correct permissions. You should always check that the
program can cope with a zero length file.

Adrian

email: adrian.bridgett@poboxes.com       | Debian Linux - www.debian.org
http://www.poboxes.com/adrian.bridgett   | Because bloated, unstable 
PGP key available on public key servers  | operating systems are from MS


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: