[Bug 937714] Re: command-not-found crashing with incomplete locale settings
Brian Murray
brian at ubuntu.com
Wed Feb 22 20:52:23 UTC 2012
command-not-found should have printed some more information as seen in
the following:
print >> sys.stderr, _("command-not-found version: %s") % version
print >> sys.stderr, _("Python version: %d.%d.%d %s %d") % sys.version_info
try:
import subprocess
subprocess.call(["lsb_release", "-i", "-d", "-r", "-c"], stdout=sys.stderr)
except (ImportError, OSError):
pass
print >> sys.stderr, _("Exception information:")
print >> sys.stderr
print >> sys.stderr, ex
try:
import traceback
traceback.print_exc()
except ImportError:
pass
Regardless I don't think command-not-found tell people goto to +filebug
but rather launch ubuntu-bug for you or just let apport catch the crash.
I'll open a separate bug for that.
** Changed in: command-not-found (Ubuntu)
Importance: Undecided => Medium
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to command-not-found in Ubuntu.
https://bugs.launchpad.net/bugs/937714
Title:
command-not-found crashing with incomplete locale settings
Status in “command-not-found” package in Ubuntu:
New
Bug description:
I'm running the latest 12.04 and I'm getting the following:
---------------snip-------------
mmrazik at fry:~$ logo
Sorry, command-not-found has crashed! Please file a bug report at:
https://bugs.launchpad.net/command-not-found/+filebug
Please include the following information with the report:
command-not-found version: 0.2.44
mmrazik at fry:~$
---------------snip-------------
This is probably 2 bugs in 1:
1. the crash itself
2. the message which tells you absolutely nothing what is going on
After some debugging I realized there is something wrong with my
locale setup (to be honest I don't know how I get into this state; I
have a fresh install with my old home and it looks like even though I
selected the en_US locale the previous CS bits stayed somewhere in
home).
-------------------snip----------------
mmrazik at fry:~$ update-locale LANG=en_US.UTF-8
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:en",
LC_ALL = (unset),
LC_PAPER = "cs_CZ.UTF-8",
LC_ADDRESS = "cs_CZ.UTF-8",
LC_MONETARY = "cs_CZ.UTF-8",
LC_NUMERIC = "cs_CZ.UTF-8",
LC_TELEPHONE = "cs_CZ.UTF-8",
LC_MEASUREMENT = "cs_CZ.UTF-8",
LC_TIME = "cs_CZ.UTF-8",
LC_NAME = "cs_CZ.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
update-locale: Unable to write /etc/default/locale: Permission denied
mmrazik at fry:~$
-------------------snip----------------
I found out there is no cs dir in /usr/share/locale-langpack/. After:
mmrazik at fry:~$ sudo apt-get install language-pack-cs
I'm getting:
mmrazik at fry:~$ logo
The program 'logo' is currently not installed. You can install it by typing:
sudo apt-get install ucblogo
mmrazik at fry:~$
How to reproduce:
- set your locale to a language with no language pack installed
- run command-not-found
- observe the crash
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/command-not-found/+bug/937714/+subscriptions
More information about the foundations-bugs
mailing list