Bug 225883 - gcompris-8.4.5 is not correctly installed
Bug#: 225883 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: games@gentoo.org Reported By: gentoo@norz.org
Component: Games
URL: 
Summary: gcompris-8.4.5 is not correctly installed
Keywords:  
Status Whiteboard: 
Opened: 2008-06-11 12:03 0000
Description:   Opened: 2008-06-11 12:03 0000
gcompris do not find ressources after emerge.

XF86VidMode: Compiled with XF86VidMode.
If you have problems starting GCompris in fullscreen, try the -x option to
disable XF86VidMode.

** (process:8026): WARNING **: Binary relocation disabled

** (process:8026): WARNING **: exec_prefix 

package_data_dir         = share/gcompris/boards
package_locale_dir       = share/locale
package_plugin_dir       = lib/gcompris
package_python_plugin_dir= share/gcompris/python
Infos:
   Config dir '/home/zas/.config/gcompris'
   Users dir '/home/zas/My GCompris'
   Database '/home/zas/.config/gcompris/gcompris_sqlite.db'

(gcompris:8026): GLib-CRITICAL **: g_dir_close: assertion `dir != NULL' failed


On start gcompris displays such messages:
Couldn't find or load the file skins/gartoon/bar_bg.jpg
This activity is incomplete.
Exit it and report the problem to the authors.

And no way to go further.

Note that previous version is working.

Reproducible: Always

Steps to Reproduce:
1. emerge games-kids/gcompris-8.4.5
2. run it
3. that's all

------- Comment #1 From Mr. Bones. 2008-06-19 21:04:04 0000 -------
well, I masked it so at least no one else will get bit by it.

Patches welcome to fix the install.

------- Comment #2 From John Whitlock 2008-06-22 05:59:50 0000 -------
(In reply to comment #1)
> Patches welcome to fix the install.

Install is doing the right thing - all files are where they are supposed to be.
 The issue is in the debug output:
package_data_dir         = share/gcompris/boards
package_locale_dir       = share/locale
package_plugin_dir       = lib/gcompris
package_python_plugin_dir= share/gcompris/python 

Those are relative paths to the executable, and not the way Gentoo likes them.

I modified gcompris.c to use the Gentoo paths, and it now displays (then
works):

package_data_dir         = /usr/share/games/gcompris/boards
package_locale_dir       = /usr/share/locale
package_plugin_dir       = /usr/games/lib64/gcompris
package_python_plugin_dir= /usr/share/games/gcompris/python

I integrated this change into the patch file - I'll upload my new one.

One possible issue - users may have to run gcompris --create-db , if they have
a corrupted database from the masked version.  Maybe.  I might have messed mine
up myself.

------- Comment #3 From John Whitlock 2008-06-22 06:02:35 0000 -------
Created an attachment (id=157971) [details]
Working version of gcompris-8.4.5 patch

In src/gcompris/gcompris.c , force paths to Gentoo Games standards, not
relative to binary

------- Comment #4 From Ulrich Müller 2008-06-22 08:11:08 0000 -------
While you're at it, can we also get rid of the path names containing
whitespace, such as "$HOME/My GCompris"?

------- Comment #5 From John Whitlock 2008-06-22 14:52:26 0000 -------
(In reply to comment #4)
> While you're at it, can we also get rid of the path names containing
> whitespace, such as "$HOME/My GCompris"?
> 

This is annoying.  Maybe it was done for the Windows build?  They do have an
option to change the folder:
gcompris --user-dir="$HOME/MyGCompris"

However, since we're modifying the source to be Gentoo specific anyway, I'll
make the change as a variant of my previous patch

------- Comment #6 From John Whitlock 2008-06-22 15:13:40 0000 -------
Created an attachment (id=158009) [details]
8.4.5 path fixes, plus "$HOME/My GCompris" -> "$HOME/MyGCompris"

------- Comment #7 From Pacho Ramos 2008-07-21 14:03:55 0000 -------
Created an attachment (id=161001) [details]
gcompris-8.4.5-prefix.patch

Fedora uses this patch for fixing this:
https://bugzilla.redhat.com/show_bug.cgi?id=448642

But I didn't have time for testing it yet :-S

------- Comment #8 From Mr. Bones. 2008-07-21 15:55:29 0000 -------
Thanks for the pointer.  I added that patch to portage.