Jedy Wang wrote:
> 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.
OK that makes sense.
>> 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.
I don't think the fix for 2357 caused this problem I think it just
uncovered a preexisting issue.
>
> 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 was thinking that this would probably fix this issue but wanted to talk
through it with you to make sure I wasn't missing something. Would it also make
sense to use B_TRUE here so that cposix is the default locale for "No default
Language support"?
>
> 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.
Do these solve the problems seen in 3254 as well or is there more to it then
what we've talked about here? It appears from the bug reports that 3254 was
split into 4499 and 4500 and should be closed when these are fixed. Does that
sound correct?
>
> Regards,
>
> Jedy
Thank you for looking at this and waling through it for me!
-evan