Hi Evan,

Please see my comments inline.
On Mon, 2008-11-03 at 16:25 -0700, Evan Layton wrote:
> Hi Jedy,
> 
> I'm attempting to narrow down the root cause of this bug and I'm
> in need of some help. It appears that this bug started happening
> when the change for 2357 was push, however it doesn't really
> look like that is the cause of the problem. It appears that when
> "No default Language support" is chosen we end up with two
> problems. The first is that cposix has no default locale set so
> we don't end up displaying a locale in the locale combo box on
> the language window.
This problem is caused by get_locale_name in language-screen.c. It tries
to return sub-string in () but failed when there is no () in the string.
I will try to fix it.
>  The second is that because the the locale
> description is set to "C/POSIX" that is what we end up putting
> into /etc/default/init. I think previous to the fix for 2357
> the "No default Language support" choice didn't end up putting
> anything in /etc/default/init however with this change we now
> grab "C/POSIX" and set LANG="C/POSIX" in this file. Because of
> this we get several error messages about an invalid locale when
> the system boots up.
I am not sure how fix for 2357 causes this problem. The fix just change
the way how we render locale string in the combo box. It does not affect
how the selected locale is passed to liborchetrator.

The "No default Language support" entry is not return by
liborchestrator. It is hardcoded in orchestrator-wrappers.c and its
related locale "C/POSIX" is also hardcoded. It's intend to used by GUI
only but when it is selected as the default language and locale, string
"C/POSIX" is passed to liborchestrator and finally goes
into /etc/default/init.

---------------->8-----------------------
#define NODEFAULTLANGLABEL "No default language support"
....
    /*
     * Add C/Posix to the language list
     */
    if (nodefault.lang_name == NULL)
        nodefault.lang_name = g_strdup(_(NODEFAULTLANGLABEL));
    if (nodefault.lang == NULL)
        nodefault.lang = g_strdup(_(NODEFAULTLANGLABEL));

---------------->8-----------------------
/* language stuff */
static locale_info_t cposix = {
    N_("C/POSIX"),
    N_("C/POSIX"),
    B_FALSE,
    NULL
};
---------------->8-----------------------

To fix the problem, I think I can set the locale name (which is passed
to liborchestrator) to "C" which is a valid locale. What do you think?

I filed 2 bugs, http://defect.opensolaris.org/bz/show_bug.cgi?id=4499
and http://defect.opensolaris.org/bz/show_bug.cgi?id=4500 for the
problem.

Regards,

Jedy
> 
> What I need from you is some of your time to walk me through
> the interactions of install-lan.c and language-screen.c in
> gui-install. I'm also a bit fuzzy on all the interactions
> between this and liborchestrator.
> 
> Would you have some time this morning (Beijing time) to walk me
> through some of this?
> 
> Thank you!
> -evan


Reply via email to