After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 328668 - devhelp should look into g_get_system_data_dir
devhelp should look into g_get_system_data_dir
Status: RESOLVED FIXED
Product: devhelp
Classification: Applications
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: Mikael Hallendal
Mikael Hallendal
Depends on:
Blocks:
 
 
Reported: 2006-01-26 00:04 UTC by Behdad Esfahbod
Modified: 2006-02-18 09:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch against cvs head with cvs diff -up (1.95 KB, patch)
2006-02-01 22:22 UTC, Antoine Dopffer
committed Details | Review

Description Behdad Esfahbod 2006-01-26 00:04:07 UTC
Currently devhelp looks for help files in the following locations:

        base_add_books (base, DATADIR "/gtk-doc/html");
        base_add_books (base, "/usr/share/gtk-doc/html");
        base_add_books (base, DATADIR "/devhelp/books");

While this works to some extents, it fails for example when I compile and install gnome software in my home directory, but have not installed devhelp in the same prefix.

Devhelp should use g_get_home_data_dir and all elements of g_get_system_data_dir to add books.  This is according to the basedir spec:

  http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html
Comment 1 Behdad Esfahbod 2006-01-31 23:25:07 UTC
Marking for gnome-love.
Comment 2 Antoine Dopffer 2006-02-01 22:22:41 UTC
Created attachment 58552 [details] [review]
patch against cvs head with cvs diff -up

Hello, 

with this patch,  devhelp looks into 
* g_get_system_data_dir/g_get_user_data_dir + "gtk-doc" + "html"
* g_get_system_data_dir/g_get_user_data_dir + "devhelp" + "books"  
where + means concat 

Regards,
Comment 3 Behdad Esfahbod 2006-02-02 01:35:19 UTC
Thanks!
Don't know if that makes a difference, but g_get_user_data_dir should come before g_get_system_data_dirs.
Comment 4 Behdad Esfahbod 2006-02-02 01:35:44 UTC
Devhelp developers, do you want me to commit this?
Comment 5 Richard Hult 2006-02-17 22:25:03 UTC
Great! Please commit :)
Comment 6 Behdad Esfahbod 2006-02-18 09:35:08 UTC
2006-02-18  Behdad Esfahbod  <behdad@gnome.org>

        * src/dh-base.c (base_init_books): Add books installed into user and
        system data dirs. Patch from Antoine Dopffer. Fixes bug #328668.