Bug 539246

Summary: preupgrade-cli --help failes with LANG=sv_SE.UTF-8
Product: [Fedora] Fedora Reporter: Jonas Jonsson <jonas>
Component: preupgradeAssignee: Seth Vidal <skvidal>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 12CC: biaji.cn, rhughes
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: abrt_hash:46101a26
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-13 11:19:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jonas Jonsson 2009-11-19 18:01:45 UTC
Description of problem:
Running preupgrade-cli --help failes when using a LANG=sv_SE.UTF-8. Probably something with localization.

If I use LANG=C preupgrade-cli --help it works as it should.

Version-Release number of selected component (if applicable):
preupgrade-1.1.2-1.fc11

How reproducible:
Everytime.

Steps to Reproduce:
1. LANG=sv_SE.UTF-8 preupgrade-cli --help
  
Actual results:
# LANG=sv_SE.UTF-8 preupgrade-cli --help
/usr/lib/python2.6/site-packages/yum/__init__.py:203: UserWarning: Use .preconf instead of passing args to _getConfig
  warnings.warn('Use .preconf instead of passing args to _getConfig')
Inlästa insticksmoduler: blacklist, whiteout
Traceback (most recent call last):
  File "/usr/share/preupgrade/preupgrade-cli.py", line 295, in <module>
    myrelease = pu.getconfig() # sets pu.opts
  File "/usr/share/preupgrade/preupgrade-cli.py", line 135, in getconfig
    opts = self.doUtilConfigSetup()
  File "/usr/share/yum-cli/utils.py", line 99, in doUtilConfigSetup
    (opts, self.cmds) = self._parser.setupYumConfig()
  File "/usr/share/yum-cli/cli.py", line 1157, in setupYumConfig
    (opts, cmds) = self.parse_args()
  File "/usr/lib64/python2.6/optparse.py", line 1378, in parse_args
    stop = self._process_args(largs, rargs, values)
  File "/usr/lib64/python2.6/optparse.py", line 1418, in _process_args
    self._process_long_opt(rargs, values)
  File "/usr/lib64/python2.6/optparse.py", line 1493, in _process_long_opt
    option.process(opt, value, values, self)
  File "/usr/lib64/python2.6/optparse.py", line 782, in process
    self.action, self.dest, opt, value, values, parser)
  File "/usr/lib64/python2.6/optparse.py", line 802, in take_action
    self.callback(self, opt, value, parser, *args, **kwargs)
  File "/usr/share/yum-cli/cli.py", line 1275, in _wrapOptParseUsage
    self.base.usage()
  File "/usr/share/yum-cli/cli.py", line 1046, in usage
    sys.stdout.write(self.optparser.format_help())
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 614: ordinal not in range(128)


Expected results:
The help text.

Additional info:
Found it when trying to upgrade from F11 to F12.

Comment 1 Jonas Jonsson 2009-11-19 18:31:51 UTC
More problems related

Traceback (most recent call last):
  File "/usr/share/preupgrade/preupgrade-cli.py", line 312, in <module>
    pu.main(myrelease)
  File "/usr/share/preupgrade/preupgrade-cli.py", line 250, in main
    if not self.userconfirm():
  File "/usr/share/yum-cli/output.py", line 629, in userconfirm
    choice = raw_input(_('Is this ok [y/N]: '))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xc4' in position 0: ordinal not in range(128)

Comment 2 Will Woods 2009-11-20 15:56:27 UTC
*** Bug 539452 has been marked as a duplicate of this bug. ***

Comment 3 Will Woods 2009-11-20 15:56:52 UTC
Adding abrt hash from dup bug

Comment 4 Bug Zapper 2010-04-28 11:23:15 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 5 Bug Zapper 2010-06-28 15:28:56 UTC
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 6 Jonas Jonsson 2010-06-28 17:39:38 UTC
Present in F12 as well
Download packages? 
Traceback (most recent call last):
  File "/usr/share/preupgrade/preupgrade-cli.py", line 327, in <module>
    pu.main(release)
  File "/usr/share/preupgrade/preupgrade-cli.py", line 265, in main
    if not self.userconfirm():
  File "/usr/share/yum-cli/output.py", line 647, in userconfirm
    choice = raw_input(_('Is this ok [y/N]: '))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xc4' in position 0: ordinal not in range(128)

preupgrade-1.1.7-1.fc12.noarch

$ locale
LANG=sv_SE.UTF-8
LC_CTYPE="sv_SE.UTF-8"
LC_NUMERIC="sv_SE.UTF-8"
LC_TIME="sv_SE.UTF-8"
LC_COLLATE="sv_SE.UTF-8"
LC_MONETARY="sv_SE.UTF-8"
LC_MESSAGES="sv_SE.UTF-8"
LC_PAPER="sv_SE.UTF-8"
LC_NAME="sv_SE.UTF-8"
LC_ADDRESS="sv_SE.UTF-8"
LC_TELEPHONE="sv_SE.UTF-8"
LC_MEASUREMENT="sv_SE.UTF-8"
LC_IDENTIFICATION="sv_SE.UTF-8"
LC_ALL=

Comment 7 Richard Hughes 2010-07-13 11:19:16 UTC

*** This bug has been marked as a duplicate of bug 574052 ***