im-config hangs if LC_CTYPE does not have quotes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
im-config (Ubuntu) |
Fix Released
|
High
|
Aron Xu |
Bug Description
If LC_CTYPE does not have any quotes, regex does not hit, then im-config hangs at the point below.
/usr/share/
92 IM_CONFIG_
93 IM_CONFIG_
$ cat ~/.pam_environment
LC_CTYPE=
LC_PAPER=
LC_MEASUREMENT=
PAPERSIZE=a4
$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US
LC_CTYPE=
LC_NUMERIC=
LC_TIME=en_US.UTF-8
LC_COLLATE=
LC_MONETARY=
LC_MESSAGES=
LC_PAPER=
LC_NAME=en_US.UTF-8
LC_ADDRESS=
LC_TELEPHONE=
LC_MEASUREMENT=
LC_IDENTIFICATI
LC_ALL=
$ bash -x /usr/bin/im-config
+ . /usr/share/
++ IM_CONFIG_
++ IM_CONFIG_
++ IM_CONFIG_
++ IM_CONFIG_
++ IM_CONFIG_
++ IM_CONFIG_
++ . gettext.sh
+++ test 'X\t' = 'X\t'
+++ echo=echo
+++ test -z ''
+++ case "$0" in
++ TEXTDOMAIN=
++ export TEXTDOMAIN
++ TEXTDOMAINDIR=
++ export TEXTDOMAINDIR
++ '[' -r /etc/default/
++ . /etc/default/
+++ IM_CONFIG_
++ id -u
+ '[' 1000 = 0 ']'
+ IM_CONFIG_
++ gettext 'user configuration'
+ IM_CONFIG_
++ automatic_im
++ '[' -r /usr/share/
+++ locale
+++ sed -nr 's/LC_CTYPE=
++ IM_CONFIG_LC_CTYPE=
+++ grep /usr/share/
+++ awk '{print $2}'
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: im-config 0.27-1ubuntu3
ProcVersionSign
Uname: Linux 3.19.0-9-generic x86_64
ApportVersion: 2.16.2-0ubuntu3
Architecture: amd64
CurrentDesktop: Unity
Date: Fri Mar 13 22:26:12 2015
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-02-28 (12 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Alpha amd64 (20150228)
PackageArchitec
SourcePackage: im-config
UpgradeStatus: No upgrade log present (probably fresh install)
Hi Nobuto,
So it wasn't so theoretical, after all. ;) One way to fix it is to change line 92 in /usr/share/ im-config/ xinputrc. common to:
IM_CONFIG_ LC_CTYPE= $(locale | sed -nr 's/LC_CTYPE= \"?([a- zA-Z_]* ).*/\1/ p')