These files should only be updated if the format changes, but always get overwritten: /usr/share/games/nethack/record (stores the scores and all my stupid deaths!) /usr/share/games/nethack/logfile (just logs what games have been started) /usr/share/games/nethack/perm (an empty file used for locking) Reproducible: Always Steps to Reproduce: 1. emerge nethack Actual Results: The files record, logfile and perm got overwritten. Expected Results: I was upgrading from v3.4.0-r5 to v3.4.0-r6 so the ebuild script should have checked my current version of nethack, seen that the formats hadn't changed and not overwritten the files. Same happens emerging v3.4.0-r6 when v3.4.0-r6 is installed.
i'll let this lay until Bug 14321 is fixed
I noticed that the nethack version number gets stored in the record file, so I had a look at the source code and found that: record - this is geared up to deal with storing and reading scores from different versions. logfile - only gets written to, never read. perm - this file just gets linked to. So, I don't think these files should ever get overwritten if they already exist. Don't know enough about emerge to know if this removes the dependency on bug #14321.
Nethack has a 'make update' process that is designed to protect the record, logfile, etc. when installing over an exist nethack install. Perhaps the ebuild should be changed to test for the existence of a nethack install. (Does portage presently have an api to do this from inside an ebuild?) If the ebuild exists, it should do a 'make update', and not a 'make install'.
ok, i updated the ebuild so that if those files exist then the files in ${D} will be renamed with a .sample at the end