Bug 526854 - running firstboot as user in non-English locales gives utf8 backtrace
Summary: running firstboot as user in non-English locales gives utf8 backtrace
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: smolt
Version: 14
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Mike McGrath
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-02 05:39 UTC by Jens Petersen
Modified: 2010-09-03 04:02 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-09-03 04:02:37 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
When applied this patch firstboot warning is gone (518 bytes, patch)
2010-09-02 06:30 UTC, Parag Nemade
no flags Details | Diff

Description Jens Petersen 2009-10-02 05:39:11 UTC
Description of problem:
When firstboot is run in a locale uses non-ascii characters
firstboot backtrace

Version-Release number of selected component (if applicable):
firstboot-1.109-1.fc12

How reproducible:
every time

Steps to Reproduce:
1. LANG=de_DE.UTF-8 firstboot
2. LANG=ja_JP.UTF-8 firstboot
3. etc
  
Actual results:
Traceback (most recent call last):
  File "/usr/lib64/python2.6/logging/__init__.py", line 773, in emit
    stream.write(fs % msg.encode("UTF-8"))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 27: ordinal not in range(128)

Expected results:
translation of
$ LANG=C firstboot 
firstboot ERROR: You must be root to run firstboot.

Additional info:

Comment 1 Chris Lumens 2009-10-02 13:47:21 UTC
Is there more to the traceback than this?  I can't see where in firstboot this is coming from with just one line to go on.

Comment 2 Jens Petersen 2009-10-06 08:00:06 UTC
No this is it.

I think it is trivial to reproduce from a shell.

Comment 3 Chris Lumens 2009-10-06 16:00:05 UTC
Looks to be a bug in a python module - either logging or gettext.  All we're doing here is:

import gettext
_ = lambda x: gettext.ldgettext("firstboot", x)

if not opts.test and (os.getuid() > 0 or os.geteuid() > 0):
    logging.error(_("You must be root to run firstboot."))
    os._exit(0)

Comment 4 Bug Zapper 2009-11-16 13:11:28 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Parag Nemade 2010-09-02 06:30:49 UTC
Created attachment 442550 [details]
When applied this patch firstboot warning is gone

Looks firstboot traceback shows problem in /usr/bin/smoltSendProfile

Comment 6 Parag Nemade 2010-09-03 04:02:37 UTC
Fixed in smolt-1.4.2.2-3.fc14


Note You need to log in before you can comment on or make changes to this bug.