Bug 526854 - running firstboot as user in non-English locales gives utf8 backtrace
running firstboot as user in non-English locales gives utf8 backtrace
Product: Fedora
Classification: Fedora
Component: smolt (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Mike McGrath
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-10-02 01:39 EDT by Jens Petersen
Modified: 2010-09-03 00:02 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-09-03 00:02:37 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Jens Petersen 2009-10-02 01:39:11 EDT
Description of problem:
When firstboot is run in a locale uses non-ascii characters
firstboot backtrace

Version-Release number of selected component (if applicable):

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 09:47:21 EDT
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 04:00:06 EDT
No this is it.

I think it is trivial to reproduce from a shell.
Comment 3 Chris Lumens 2009-10-06 12:00:05 EDT
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."))
Comment 4 Bug Zapper 2009-11-16 08:11:28 EST
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:
Comment 5 Parag Nemade 2010-09-02 02:30:49 EDT
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 00:02:37 EDT
Fixed in smolt-

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