Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 16428 - nethack record, logfile and perm files get overwritten on update/re-install
Summary: nethack record, logfile and perm files get overwritten on update/re-install
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on: 14321
Blocks:
  Show dependency tree
 
Reported: 2003-02-26 17:23 UTC by Giblets
Modified: 2003-07-11 07:05 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Giblets 2003-02-26 17:23:41 UTC
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.
Comment 1 SpanKY gentoo-dev 2003-02-26 22:15:04 UTC
i'll let this lay until Bug 14321 is fixed 
Comment 2 Giblets 2003-03-01 08:53:11 UTC
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. 
Comment 3 Eric Hustvedt 2003-03-04 00:03:17 UTC
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'.
Comment 4 SpanKY gentoo-dev 2003-07-11 07:05:31 UTC
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