← Back to team overview

desktop-packages team mailing list archive

[Bug 908801] Re: libgtk-3-0:<arch>.postinst erase IM cache file, that breaks GTK-3 apps IM environment.

 

** Changed in: gtk+3.0 (Ubuntu Precise)
       Status: Triaged => Fix Committed

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to gtk+3.0 in Ubuntu.
https://bugs.launchpad.net/bugs/908801

Title:
  libgtk-3-0:<arch>.postinst erase IM cache file, that breaks GTK-3 apps
  IM environment.

Status in “gtk+3.0” package in Ubuntu:
  Fix Committed
Status in “gtk+3.0” source package in Precise:
  Fix Committed

Bug description:
  /var/lib/dpkg/info/libgtk-3-0:<arch>.postinst breaks InputMethod(IM)
  cache file(immodules.cache), so that breaks IM environment for GTK-3
  based applications.

  [How to reproduce]

  1) install precise
  2) sudo apt-get update && sudo apt-get upgrade libgtk-3-0=3.3.4-0ubuntu2
  3) open gnome-terminal
  4) Type ctrl-space(or your IM invoke key)

  [Actual results]

  IM(e.g. ibus) does not invoked. But, non GTK-3 application (such as
  Firefox) could use ibus.

  [Expect results]

  IM invoked.

  [Root cause/Background]

  In many IM stacks, that use /usr/lib/<arch>/gtk-3.0/3.0.0/immodules.cache file for invoking. 
  If that file has exists && empty, IM stacks could not start on GTK-3 applications.

  in GTK-3 postinst scriptlet(e.g.
  /var/lib/dpkg/info/libgtk-3-0:i386.postinst), that uses shell-globs
  with unsafe way. If glob files does not exist, gtk-query-immodules-3.0
  command does not output anything. So, /usr/lib/i386-linux-
  gnu/gtk-3.0/3.0.0/immodules.cache file xed out by redirectiton.

  if [ "$1" = triggered ]; then
      for trigger in $2; do
          if ! [ -d $trigger ]; then
              continue
          fi
          case $trigger in
            /usr/lib/i386-linux-gnu/gtk-3.0/3.0.0/immodules|/usr/lib/gtk-3.0/3.0.0/immodules)
              # This is triggered everytime an application installs a
              # GTK immodule loader
              /usr/lib/i386-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0 /usr/lib/i386-linux-gnu/gtk-3.0/3.0.0/immodules/*.so /usr/lib/gtk-3.0/3.0.0/immodules/*.so > /usr/lib/i386-linux-gnu/gtk-3.0/3.0.0/immodules.cache || true
              ;;
          esac
      done
      exit 0
  fi

  
  e.g.:
  # /usr/lib/i386-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0 /usr/lib/i386-linux-gnu/gtk-3.0/3.0.0/immodules/*.so /usr/lib/gtk-3.0/3.0.0/immodules/*.so 
  /usr/lib/i386-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0 /usr/lib/i386-linux-gnu/gtk-3.0/3.0.0/immodules/*.so /usr/lib/gtk-3.0/3.0.0/immodules/*.so 
  Cannot load module /usr/lib/gtk-3.0/3.0.0/immodules/*.so: /usr/lib/gtk-3.0/3.0.0/immodules/*.so: cannot open shared object file: No such file or directory
  /usr/lib/gtk-3.0/3.0.0/immodules/*.so does not export GTK+ IM module API: /usr/lib/gtk-3.0/3.0.0/immodules/*.so: cannot open shared object file: No such file or directory

  
  ----------------------------------------------------------------

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: libgtk-3-0 3.3.4-0ubuntu2
  ProcVersionSignature: Ubuntu 3.0.0-13.22-generic-pae 3.0.6
  Uname: Linux 3.0.0-13-generic-pae i686
  ApportVersion: 1.90-0ubuntu1
  Architecture: i386
  Date: Tue Dec 27 00:45:22 2011
  InstallationMedia: Ubuntu 11.10 "Oneiric" - Build i386 LIVE Binary 20111014-16:01
  ProcEnviron:
   PATH=(custom, user)
   LANG=ja_JP.utf8
   SHELL=/bin/zsh
  SourcePackage: gtk+3.0
  UpgradeStatus: Upgraded to precise on 2011-12-13 (12 days ago)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gtk+3.0/+bug/908801/+subscriptions


References