Bug 905100 - yum grouplist fails when customized locale in use
Summary: yum grouplist fails when customized locale in use
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum
Version: 6.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Valentina Mukhamedzhanova
QA Contact: Marek Marusic
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-28 15:22 UTC by James B. Byrne
Modified: 2015-07-22 07:20 UTC (History)
5 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2015-07-22 07:20:59 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1384 normal SHIPPED_LIVE yum bug fix and enhancement update 2015-07-20 18:07:41 UTC

Description James B. Byrne 2013-01-28 15:22:25 UTC
Description of problem:

yum grouplist command fails with unknown locale error when a user defined locale is specified in the environment

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

3.2.29

How reproducible:

Always

Steps to Reproduce:
1. Define and compile custom locale
2. run 'yum grouplist'
3.
  
Actual results:

ValueError: unknown locale: en_CA@yyyy-mmm-dd.UTF-8

Expected results:

Shows list of yum package groups available

Additional info:

This is the automatically produced dump message:

Subject: [abrt] full crash report
User-Agent: Heirloom mailx 12.4 7/29/08
Content-Type: text/plain; charset=us-ascii
Status: R

abrt_version:   2.0.8
cmdline:        /usr/bin/python /usr/bin/yum grouplist installed
executable:     /usr/bin/yum
kernel:         2.6.32-279.19.1.el6.x86_64
reason:         locale.py:410:_parse_localename:ValueError: unknown locale: en_CA@yyyy
-mmm-dd.UTF-8
time:           Mon 28 Jan 2013 09:20:02  EST
uid:            0
username:       root

sosreport.tar.xz: Binary file, 761720 bytes

backtrace:
:locale.py:410:_parse_localename:ValueError: unknown locale: en_CA@yyyy-mmm-dd.UTF-8
:
:Traceback (most recent call last):
:  File "/usr/bin/yum", line 29, in <module>
:    yummain.user_main(sys.argv[1:], exit_code=True)
:  File "/usr/share/yum-cli/yummain.py", line 285, in user_main
:    errcode = main(args)
:  File "/usr/share/yum-cli/yummain.py", line 136, in main
:    result, resultmsgs = base.doCommands()
:  File "/usr/share/yum-cli/cli.py", line 438, in doCommands
:    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.ext
cmds)
:  File "/usr/share/yum-cli/yumcommands.py", line 457, in doCommand
:    return base.returnGroupLists(extcmds)
:  File "/usr/share/yum-cli/cli.py", line 1215, in returnGroupLists
:    patterns=userlist)
:  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 2810, in doGroupLists
:    case_sensitive=not ignore_case)
:  File "/usr/lib/python2.6/site-packages/yum/comps.py", line 433, in return_groups
:    for name in group.name, group.groupid, group.ui_name:
:  File "/usr/lib/python2.6/site-packages/yum/comps.py", line 48, in ui_name
:    return self.nameByLang(get_my_lang_code())
:  File "/usr/lib/python2.6/site-packages/yum/misc.py", line 1001, in get_my_lang_code
:    mylang = locale.getlocale(locale.LC_MESSAGES)
:  File "/usr/lib64/python2.6/locale.py", line 497, in getlocale
:    return _parse_localename(localename)
:  File "/usr/lib64/python2.6/locale.py", line 410, in _parse_localename
:    raise ValueError, 'unknown locale: %s' % localename
:ValueError: unknown locale: en_CA@yyyy-mmm-dd.UTF-8
:
:Local variables in innermost frame:
:code: 'en_CA'
:localename: 'en_CA@yyyy-mmm-dd.UTF-8'
:modifier: 'yyyy-mmm-dd.UTF-8'


This is the locale file info:

/usr/lib/locale/en_CA@yyyy-mmm-dd.iso88591/LC_MESSAGES
/usr/lib/locale/en_CA@yyyy-mmm-dd/LC_MESSAGES
/usr/lib/locale/en_CA@yyyy-mmm-dd.UTF-8/LC_MESSAGES
/usr/lib/locale/en_CA@yyyy-mmm-dd.UTF8/LC_MESSAGES
/usr/lib/locale/en_CA@yyyy-mmm-dd.utf-8/LC_MESSAGES
/usr/lib/locale/en_CA@yyyy-mmm-dd.utf8/LC_MESSAGES

Comment 2 James Antill 2013-01-31 18:02:22 UTC
 This is already fixed upstream with:

commit 7738cfbffe3066fca4a6c8a514f9b56f09ab2eb3
Author: James Antill <james@and.org>
Date:   Fri May 27 16:24:34 2011 -0400

    Work around RHEL-5 python broken getlocale() call. BZ 708292

...just need to add it.

Comment 3 RHEL Product and Program Management 2013-10-14 00:01:34 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 7 errata-xmlrpc 2015-07-22 07:20:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-1384.html


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