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 68474 - module path defaults
module path defaults
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Documentation
1.3.x
Other other
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 51833
 
 
Reported: 2002-01-11 08:27 UTC by Matthias Clasen
Modified: 2011-02-04 16:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Matthias Clasen 2002-01-11 08:27:09 UTC
there are 4 kinds of modules which are loaded by gtk apps:

gtk modules are searched in
${libdir}/gtk-2.0/modules/$gtk-version 
${libdir}/gtk-2.0/modules

gtk im modules are searched in 
${libdir}/gtk-2.0/immodules/$gtk-version 

gdk-pixbuf loaders are searched in 
${libdir}/gtk-2.0/$gtk-version/loaders

theme engines are searched in 
${libdir}/gtk-2.0/$gtk-version/engines
$HOME/.gtk-2.0/$gtk-version/engines

Shouldn't this be made more consistent ?

a) always use the $prefix/$type/$version order of subdirectories
b) always fall back to $prefix/$type
c) always fall back to a $HOME location after trying a system location
Comment 1 Owen Taylor 2002-01-15 15:46:54 UTC
a) Yes

b, c). Probably, but not for gdk-pixbuf, since the set of 
gdk-pixbuf loaders isn't extensible.
Comment 2 Owen Taylor 2002-02-02 05:16:20 UTC
#51833 is another related issue. (Another architecture where
architecture specific modules come up is ia64 where you
have both ia64 and ia32 emulation; it's not IRIX specific.)
So, perhaps the search order should be:

 for a in ("$libdir/gtk-2.0/$type/"", "$HOME/gtk-2.0/$type/")
   for b in ("$binver/","")
     for c in ("$target/","")
       look in "$a$b$c"

(Or should home directory location have precendence over 
the system location?)
   
Comment 3 Matthias Clasen 2002-02-07 08:24:05 UTC
I think it would make more sense to give home precedence over
system.
Comment 4 Owen Taylor 2002-02-15 04:54:41 UTC
It occurs to me that 

 $version/$target/$type

is almost certainly a little more convenient than:

 $type/$version/$target

Since it keeps everything for one verson together.

Compare:

 /usr/lib/perl5/5.6.0/i386-linux/[lots of stuff]
 /usr/lib/gcc-lib/i386-redhat-linux/2.96/[lots of stuff]

(These disagree on $version/$target $target/$version, but
I prefer $version/$target since version is more important
for most people using GTK+)

Comment 5 Owen Taylor 2002-02-15 04:59:24 UTC
One question is whether we should install in $version/$target
by default, or leave that rearrangement up to people that need it. 
I think, on balance, we should omit the target portion in the default
install setup, since you can have unstable targets on a 
single machine. (We should, however, write the target into
gtk+-2.0.pc.in as we do with the binary version currnetly
so the information is at least available.)

If people complain, we can tweak the install locations later.
Comment 6 Matthias Clasen 2002-02-15 12:31:55 UTC
Sound good. I don't care very much about $target/$version vs
$version/$target, as long as the same order is used consistently
for all $types. You are probably right that $version/$target is
more convenient for most people, but of course leaving out $target
by default makes the question moot 99% of the time.
Comment 7 Owen Taylor 2002-02-15 13:48:21 UTC
Looking at the implementation, remembered why I went with
$type/$version rather than $version/$type ... $version/$type
doens't interact well with GTK_IM_MODULE_PATH, and GTK_MODULE_PATH
since it means you have to specify parent directories of the
directory, rather than the directory itself.

Though it might make sense to replace GTK_EXE_PREFIX,
GTK_IM_MODULE_PATH, GTK_MODULE_PATH with a simple single
path that defaults to $libdir/gtk-2.0 $HOME/gtk-2.0.
Comment 8 Owen Taylor 2002-02-16 00:23:24 UTC
See:

http://mail.gnome.org/archives/gtk-devel-list/2002-February/msg00253.html

and folloup(s) for a summary.

Move to 1.3.15, since I don't want to start hacking this until we are
pretty confident.

Comment 9 Owen Taylor 2002-02-19 05:28:53 UTC
Mon Feb 18 23:16:16 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkmain.[ch]: Add routines _gtk_find_module(),
        _gtk_get_module_path() to look up a module of an arbitrary type in
        a standard fashion. (#68474)

        * gtk/gtkrc.c: Make module_path keyword warn and do
        nothing. Remove the im_module_path keyword.

        * gtk/gtkrc.c (gtk_rc_get_im_module_path): Fix
        to return the standard path instead of one determined
        from im_module_path and GTK_IM_MODULE_PATH.
        
        * gtk+-2.0.pc.in: Add gtk_host to go along with
gtk_binary_version.
Comment 10 Matthias Clasen 2002-02-19 09:50:48 UTC
Reopening this, because I need to remember to adjust the API
docs (it is in docs/reference/gtk/running.sgml).
Comment 11 Matthias Clasen 2002-02-20 07:53:17 UTC
Oh, I overlooked the fact that you already fixed the docs
(you didn't paste that ChangeLog). Closing now.