[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Gtk 2 Input Methods -- not FHS compliant?



        Hi,

 Gtk 2 supports dynamic loading of "Input Methods", called immodules.
 A list of available and enabled immodules was generated in
 /etc/gtk-2.0/gtk.immodules via different tools, and from the scripts of
 different packages: for example, libgtk2.0-bin calls
 /usr/sbin/update-gtk-immodules (which it ships) in its postinst
 overwriting any /etc/gtk-2.0/gtk.immodules on the system, and rm -rf
 /etc/gtk-2.0 on purge.

 There's no standardized way of updating the database of available
 immodules, for example gucharmap called libgtk2.0-bin's
 /usr/bin/gtk-query-immodules-2.0 tool to overwrite the list of
 immodules in its postinst, and did nothing in its postrm.


 There are multiple issues to address:

 1/ the database of available immodules is clearly not a configuration
 file and the way it is handled suggest it should be in /var/lib instead
 of /etc; this is a FHS violation as underlined in #329903 and #330047
 and is either an important or serious bug

 2/ to standardize the way immodules are installed and removed, an
 unique tool should be offered to package maintainers and/or some
 documentation should be made available; this could be one of the
 existing tools, or a new tool such as a dh_gtkimmodules which would
 ensure correct postinst and postrm script, and correct deps; this would
 ensure we don't see RCs such as #329929

 3/ some users expressed the wish to filter out some of the immodules;
 this is lower priority, but shouldn't be overly complicated to take
 care of if a shell script such as /usr/sbin/update-gtk-immodules is
 kept


 I've queried packages.debian.org for files looking like immodules, and
 found some in the following source packages:
    gtk+2.0
    gtk+2.0-directfb
    tamil-gtk2im
    imhangul
    im-sdk
    scim
    uim
 however, the contents file is a bit old and probably doesn't cover
 non-free.


 Proposed plan:

 a/ new dh_installgtkimmodule tool generating deps, postinst, and postrm
 snipsets as soon as some files matching /immodules/ are installed; the
 postinst and postrm snipset might call /usr/sbin/update-gtk-immodules,
 and the deps might simply be libgtk2.0-bin

 b/ slight changes to /usr/sbin/update-gtk-immodules to generate a db of
 active immodules under /var/lib, possibly using a configured filter

 c/ file bugs against immodules packages to use the new tool


 Comments?


   Bye,

-- 
Loïc Minier <lool@dooz.org>



Reply to: