[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#365628: postinst fails when LANG doesn't point to a valid locale



reopen 365628
thanks

On Fri, May 05, 2006 at 01:55:09AM +0200, Denis Barbier wrote:
> > AIUI, the checks update-locale is expected to do (and those --no-checks avoids)
> > are the ones passed as arguments (ala update-locale LANG=foo).  The manpage
> > doesn't make any reference to variables passed through the environment.
> 
> You are right, this is fixed now.

OTOH, LANG is being passed as parameter now:

    if [ -n "$SELECTED" ] && [ "$SELECTED" != "None" ]; then
        /usr/sbin/update-locale "LANG=$SELECTED"
    fi

Unfortunately you can't trust "locales/locales_to_be_generated" as generated by
locales.config, because this script could have been run in a previous version of
locales that includes entries that are no longer valid.

One solution would be to add "--no-checks".  Another, to check $SELECTED against
__SUPPORTED_LOCALES__ to ensure it's in the list (and otherwise fallback to
LANG=C).

Do you want me to send a patch for either of these?

-- 
Robert Millan

My spam trap is honeypot@aybabtu.com.  Note: this address is only intended for
spam harvesters.  Writing to it will get you added to my black list.



Reply to: