Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 192327 - The games.eclass sets GAMES_DATADIR variable incorrectly.
Summary: The games.eclass sets GAMES_DATADIR variable incorrectly.
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-12 17:44 UTC by Rob
Modified: 2007-09-12 17:49 UTC (History)
0 users

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 Rob 2007-09-12 17:44:24 UTC
The games.eclass sets the GAMES_DATADIR variable to /usr/share/games.
This is incorrect, it should be /usr/share/games/${PN} to keep the data separated by package name rather than all dumped together.  See attached patch.

Reproducible: Always

Steps to Reproduce:
1.emerge a game who's ebuild inherits games, then later calls the prepgamesdirs() function.

Actual Results:  
observe the installed locations of the games data:
/usr/share/games/images, /usr/share/games/sounds etc.

Expected Results:  
should be installed into:
/usr/share/games/${PN}/images, /usr/share/games/${PN}/sounds etc.

--- /usr/portage/eclass/games.eclass        2007-04-10 11:35:42.000000000 +1000
+++ /usr/local/portage/eclass/games.eclass  2007-09-13 02:54:24.742652284 +1000
@@ -18,7 +18,7 @@

 export GAMES_PREFIX=${GAMES_PREFIX:-/usr/games}
 export GAMES_PREFIX_OPT=${GAMES_PREFIX_OPT:-/opt}
-export GAMES_DATADIR=${GAMES_DATADIR:-/usr/share/games}
+export GAMES_DATADIR=${GAMES_DATADIR:-/usr/share/games/${PN}}
 export GAMES_DATADIR_BASE=${GAMES_DATADIR_BASE:-/usr/share} # some packages auto append 'games'
 export GAMES_SYSCONFDIR=${GAMES_SYSCONFDIR:-/etc/games}
 export GAMES_STATEDIR=${GAMES_STATEDIR:-/var/games}
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-09-12 17:49:54 UTC
(In reply to comment #0)
> Steps to Reproduce:
> 1.emerge a game who's ebuild inherits games, then later calls the
> prepgamesdirs() function.
> 
> Actual Results:  
> observe the installed locations of the games data:
> /usr/share/games/images, /usr/share/games/sounds etc.

That doesn't work. 
 $ ls -1d /usr/share/games/*
/usr/share/games/billardgl
/usr/share/games/fish-fillets
/usr/share/games/frozen-bubble
/usr/share/games/luola
/usr/share/games/neverball
/usr/share/games/ppracer
/usr/share/games/Ri-li
/usr/share/games/supertux
/usr/share/games/tuxanci
/usr/share/games/watermelons
/usr/share/games/whichwayisup
/usr/share/games/widelands

Post some actually ebuild name that produces the behaviour you've described.