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

Re: crafty: suggesting bugfixes



(Hmm, let's see if I get Mail-Followup-To -header correctly this time.)

> > > W: crafty: file-in-unusual-dir var/games/crafty/books.bin
> > > W: crafty: non-standard-file-perm var/games/crafty/books.bin 0664 != 0644
> > The first message is because we don't generally install files in /var
> > at all. I've talked to the previous maintainer of crafty about this
> > and he had some reason to put them in /var, but it's IMHO broken.

The files contain a small collection of book openings and "mate in N
moves" positions. They are in /var because when run learning enabled,
crafty saves new openings in these very same files.


> Depending on what /var/games/crafty/books.bin is meant to be, some
> options would be to:
> 
> 	* if it changes in the general course of the program (like a high
> 	  score or something), but isn't meant to be changed by hand

This is exactly how the files are used when running crafty learning mode
enabled. Whether it's the general case or a special case is debatable. I'm
simply following the example from the previous maintainer. 

I have now moved the initial files in /usr/lib/games/crafty. They are then
copied in postinst to /var/lib/games/crafty, not overwriting anything in
the process. The files are removed in postrm on purge as you suggested.

Additionally /var/cache/crafty from the older package is moved to
/var/lib/games in preinst to preserve user "configuration."

There were no lintian errors or warnings this time. I have tested that the
package can be installed, upgraded, removed and purged cleanly. As before,
the files are available at http://togo.dhs.org/debian/


-- 
Tommi Komulainen                                 Tommi.Komulainen@iki.fi
GPG 1024D/68388EE6    6FD6 DD79 EB38 BF6F 3533  09C0 04A8 9871 6838 8EE6

Attachment: pgp77KXieOodc.pgp
Description: PGP signature


Reply to: