Bug 480885

Summary: [hi_IN] [mai_IN] setlocale failed to set hi_IN as well as mai_IN languages.
Product: [Fedora] Fedora Reporter: Parag Nemade <pnemade>
Component: glibcAssignee: Parag Nemade <pnemade>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: aalam, i18n-bugs, ivazqueznet, jakub, panemade, petersen, psatpute, rranjan
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-09 03:51:20 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:
Bug Depends On: 466912    
Bug Blocks: 446452    
Attachments:
Description Flags
anaconda failure log for maithili language selection none

Description Parag Nemade 2009-01-21 04:32:14 UTC
Created attachment 329541 [details]
anaconda failure log for maithili language selection

Description of problem:
anaconda does not work with 3 letter locale like mai,Ilo
This is with refernece to patch submitted in bug473209 to enable mai(Maithili) language in anaconda.

Version-Release number of selected component (if applicable):
anaconda-11.5.0.10-1.i386

How reproducible:
always

Steps to Reproduce:
1.just start anaconda from gnome-terminal as root user
2. select Maithili and click on next
3.
  
Actual results:
backtrace with locale.Error: unsupported locale setting


Expected results:
should support locale and start anaconda in mai language.

Additional info:
This is not happening with python 2.5 in F10 and in F10 I can use Maithili

Comment 1 Ignacio Vazquez-Abrams 2009-01-21 04:54:25 UTC
From Python-2.6/Modules/_localemodule.c, lines 160 through 196:

static PyObject*
PyLocale_setlocale(PyObject* self, PyObject* args)
{
    int category;
    char *locale = NULL, *result;
    PyObject *result_object;

    if (!PyArg_ParseTuple(args, "i|z:setlocale", &category, &locale))
        return NULL;

    if (locale) {
        /* set locale */
        result = setlocale(category, locale);
        if (!result) {
            /* operation failed, no setting was changed */
            PyErr_SetString(Error, "unsupported locale setting");
            return NULL;
        }
        result_object = PyString_FromString(result);
        if (!result_object)
            return NULL;
        /* record changes to LC_CTYPE */
        if (category == LC_CTYPE || category == LC_ALL)
            fixup_ulcase();
        /* things that got wrong up to here are ignored */
        PyErr_Clear();
    } else {
        /* get locale */
        result = setlocale(category, NULL);
        if (!result) {
            PyErr_SetString(Error, "locale query failed");
            return NULL;
        }
        result_object = PyString_FromString(result);
    }
    return result_object;
}

This is just Python 2.6 reporting a failure in glibc at line 172.

Comment 2 Parag Nemade 2009-01-21 05:24:24 UTC
let me move this bug to glibc then.

Comment 3 Parag Nemade 2009-01-27 07:47:51 UTC
Okay So I got some more in depth information about this bug. A simple setlocale program fails to set for hi_IN as well as mai_IN locale but setlocale can set any other indic language.

When I check for output of "locale -a| grep hi" i got nothing on my rawhide machine. same for mai language. But for other indic languages translations as well as setlocale() works fine.

Comment 4 Parag Nemade 2009-01-27 08:20:17 UTC
Just checked build.log of glibc-2.9.90-2.fc11 =>
http://kojipkgs.fedoraproject.org/packages/glibc/2.9.90/2/data/logs/i386/build.log
and found
=========================
Adding hi_IN
Adding hne_IN
incomplete set of locale files in "hi_IN"
incomplete set of locale files in "hne_IN"
============================
so something gone wrong while adding hne_IN locale in usptream.

Comment 5 Parag Nemade 2009-01-27 08:27:25 UTC
Just found that actually hne_IN was already successfully present in previous glibc build. So this now looks upstream issue.

Ohh found some more messages in build.log for other indic languages
incomplete set of locale files in "as_IN.utf8"
incomplete set of locale files in "bn_BD"
incomplete set of locale files in "mai_IN"

Sorry for not writing all my observations in single comment.

Comment 6 Parag Nemade 2009-01-27 08:50:22 UTC
Reported upstream now.
http://sources.redhat.com/bugzilla/show_bug.cgi?id=9791

Comment 7 Parag Nemade 2009-01-28 05:00:23 UTC
This bug is appearing because of modification done in hi_IN locale which is fix for bug 466912. Once bug 466912 fix issues in hi_IN this bug will get fixed automatically.

Comment 8 Parag Nemade 2009-02-09 03:51:20 UTC
This looks fixed now with update to glibc-2.9.90-3 in rawhide.