Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 31841 - games eclass should handle /var/games better
Summary: games eclass should handle /var/games better
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-23 11:45 UTC by Mr. Bones. (RETIRED)
Modified: 2003-11-03 23:36 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 Mr. Bones. (RETIRED) gentoo-dev 2003-10-23 11:45:33 UTC
Right now, there's no protection for high score files in /var/games.

We should use cp -a or something to keep the state of /var/games in sync with
what portage has in its tiny brain while retaining the hard-earned high scores
already in /var/games.

Reproducible: Always
Steps to Reproduce:
1. merge a game
2. make a world record high score
3. upgrade said game
4. look in horror at the reset high score table

Actual Results:  
My high scores go away.

Expected Results:  
Keep my high scores.
Comment 1 Radek Podgorny 2003-11-01 04:17:19 UTC
Maybe, this could be handled by the portage's CFGPRO feature. (The one that
keeps out /etc's untouched)

Radek
Comment 2 SpanKY gentoo-dev 2003-11-03 23:36:14 UTC
should be all set now ...
local f=""
for f in `find ${D}/${GAMES_STATEDIR} -type f -printf '%P ' 2>/dev/null`
; do
    if [ -e "${ROOT}/${GAMES_STATEDIR}/${f}" ] ; then
        cp -p "${ROOT}/${GAMES_STATEDIR}/${f}" "${D}/${GAMES_STATEDIR}/${f}"
        touch "${D}/${GAMES_STATEDIR}/${f}"
    fi
done

basically it scans ${D}/${GAMES_STATEDIR}, sees if there are any files that
will be overwritten, and if so, copies the version from / to ${D} and updates
it