Bug 756397 - [as_IN] subscription-manager --help in as_IN is throwing unsupported locale setting error
Summary: [as_IN] subscription-manager --help in as_IN is throwing unsupported locale s...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: William Poteat
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: 771748 807971
TreeView+ depends on / blocked
 
Reported: 2011-11-23 12:55 UTC by Shwetha Kallesh
Modified: 2013-01-08 03:47 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-08 03:47:39 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0033 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2013-01-08 08:38:27 UTC

Description Shwetha Kallesh 2011-11-23 12:55:12 UTC
Description of problem:

subscription-manager --help in as_IN is throwing unsupported locale setting error
Version-Release number of selected component (if applicable):

subscription-manager-gnome-0.98.3-1.git.2.1a022f3.el5_7
subscription-manager-firstboot-0.98.3-1.git.2.1a022f3.el5_7
subscription-manager-migration-0.98.3-1.git.2.1a022f3.el5_7
subscription-manager-0.98.3-1.git.2.1a022f3.el5_7


How reproducible:


Steps to Reproduce:
[root@tiger ~]# LANG=as_IN subscription-manager --help 


  
Actual results:
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 54, in ?
    from subscription_manager import managercli
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 32, in ?
    from subscription_manager import constants
  File "/usr/share/rhsm/subscription_manager/constants.py", line 25, in ?
    installed_product_status = \
  File "/usr/share/rhsm/subscription_manager/constants.py", line 22, in <lambda>
    _ = lambda x: gettext.ldgettext("rhsm", x)
  File "/usr/lib64/python2.4/gettext.py", line 530, in ldgettext
    return t.lgettext(message)
  File "/usr/lib64/python2.4/gettext.py", line 355, in lgettext
    return tmsg.encode(locale.getpreferredencoding())
  File "/usr/lib64/python2.4/locale.py", line 417, in getpreferredencoding
    setlocale(LC_CTYPE, "")
  File "/usr/lib64/python2.4/locale.py", line 381, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

Expected results:
Should display subscription-manager help in assamese

Additional info:

Comment 1 A S Alam 2012-01-11 05:27:10 UTC
you can run with
$as_IN.UTF-8 subscription-manager --help 

$localedef --list|grep as_IN 
showing that 'as_IN' is present. So only way to run is 'as_IN.UTF-8'

it is not specific to SM only, but all other applications.

Comment 3 RHEL Program Management 2012-04-02 10:20:43 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 4 Ankit Patel 2012-04-17 08:56:05 UTC
Btw, just to provide an additional information that, Assamese (as_IN) was one of the Tech Preview Languages for RHEL5. Assamese was/isn't supported for RHEL5.

Thanks!
Ankit

Comment 7 Sharath Dwaral 2012-06-18 19:33:19 UTC
Description of problem:

subscription-manager --help in as_IN is throwing unsupported locale setting error

Steps to Reproduce:
# LANG=as_IN subscription-manager --help 

Actual Result:
ব্যৱহাৰ: subscription-manager MODULE-NAME [MODULE-OPTIONS] [--help]


প্ৰাথমিক মডিউলসমূহ:

	list           এই মেচিনৰ বাবে স্বাক্ষৰণ আৰু উৎপাদন তথ্য তালিকাভুক্ত কৰক
	refresh        চাৰ্ভাৰৰ পৰা শেহতীয়া স্বাক্ষৰণ তথ্য টানি আনক
	register       register the client to the Customer Portal or another subscription management service.
	release        কোন os উন্মোচন ব্যৱহাৰ কৰা হব সংৰূপণ কৰক
	subscribe      ৰেজিস্টাৰ কৰা মেচিনক এটা ধাৰ্য্য কৰা উৎপাদনলে স্বাক্ষৰ কৰক
	unregister     unregister the client from the Customer Portal or another subscription management service.
	unsubscribe    মেচিনক সকলো অথবা বিশেষ স্বাক্ষৰণসমূহৰ পৰা অস্বাক্ষৰ কৰক

অন্য মডিউলসমূহ (অনুগ্ৰহ কৰি তথ্যচিত্ৰ চাওক):

	clean          চাৰ্ভাৰক প্ৰভাৱ নেপেলাই স্থানীয় উপভোক্তা আৰু স্বাক্ষৰণ তথ্য আতৰাওক
	config         এই মেচিনৰ দ্বাৰা ব্যৱহৃত সংৰূপ প্ৰাচলসমূহ তালিকাভুক্ত কৰক, সংহতি কৰক, অথবা আতৰাওক।
	environments   এজন ব্যৱহাৰকাৰীৰ বাবে উপলব্ধ পৰিৱেশসমূহ প্ৰদৰ্শন কৰে
	facts          এই মেচিনৰ বাবে বৰ্তমান তথ্যসমূহৰ সৈতে কাম কৰক
	identity       এই মেচিনৰ বাবে পৰিচয় প্ৰমাণপত্ৰ প্ৰদৰ্শন কৰক অথবা নতুন এটা অনুৰোধ কৰক
	import         প্ৰমাণপত্ৰসমূহ যি সঁজুলিৰ বাহিৰ প্ৰদান কৰা হৈছিল ইমপোৰ্ট কৰক
	orgs           সংঘঠনসমূহ যাৰ বাবে এজন ব্যৱহাৰকাৰীয়ে এটা চিস্টেম ৰেজিস্টাৰ কৰিব পাৰে
	redeem         এটা পূৰ্বসংৰূপীত মেচিনৰ বাবে এটা স্বাক্ষৰণ ঘুৰাই নিয়াৰ চেষ্টা
	repos          এই মেচিনৰ ব্যৱহাৰ কৰিবলে অনুজ্ঞা থকা ভঁৰালসমূহ তালিকাভুক্ত কৰে
	service-level  এই চিস্টেমৰ বাবে সেৱা স্তৰসমূহ ব্যৱস্থাপনা কৰক।
	version        প্ৰিন্ট সংস্কৰণ তথ্য

Expected Result:
Same as above

Moving bug to verified state.

Comment 8 sandeep shedmake 2012-06-19 10:04:07 UTC
On RHEL5.8 box, 

with 'locale' utility (provided by glibc); only 'as_IN.utf8' is listed as available locale ('as_IN' locale is not available).


$rpm -q glibc
glibc-2.5.81

$locale --all-locales | grep as_IN
as_IN.utf8

$echo $?
0

# LANG=as_IN subscription-manager --help
...
...
locale.Error: unsupported locale setting
# echo $?
1



Following may be relevant:
1) glibc doesn't provide as_IN locale, only as_IN.utf8 
[See https://bugzilla.redhat.com/show_bug.cgi?id=657556]

2) Remove .UTF-8 suffix from locale names when it is the only supported codeset
[See http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=0e8131bb32cf026c87baeacb7abf2a9bdbbc4953]




Conclusion:
# LANG=as_IN subscription-manager --help 
would run without any error after updating 'glibc' pkg from version '2.5.81' to '2.12.x and later'.

Comment 10 errata-xmlrpc 2013-01-08 03:47:39 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.

http://rhn.redhat.com/errata/RHBA-2013-0033.html


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