Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 192327

Summary: The games.eclass sets GAMES_DATADIR variable incorrectly.
Product: Gentoo Linux Reporter: Rob <RaSTuS.Rob>
Component: EclassesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED NEEDINFO    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

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.