Bug#277073: Patch to really fix this bug
On Tuesday 28 June 2005 06:39, Christian Perrier wrote: > "if LOCALE is not C AND ((LANGUAGE not en or COUNTRY not US) or ARCH > not ppc)" Shouldn't the test for en_US be dropped altogether now that we have proper support for "C". IIRC the test was only added because we did not have "C" in languagechooser. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#277073: Patch to really fix this bug
> > +# Install localization-config only if "LANG"" != en_US or > > +# arch is powerpc. > > +# LANG is NOT defined here so we use LANGUAGE AND COUNTRY > > +# This is made here because we also need the country choice > > +if [ "$LANGUAGE" != "C" ] ; then > > + if [ "$LANGUAGE" != "en" -o "$COUNTRYCODE" != "US" ]; then > > + pkginstall localization-config > > + else > > + if [ "$ARCH" = "powerpc" ]; then > > + pkginstall localization-config > > + fi > > + fi > > +fi > > The previous test checks whether $LOCALE is not equal to C. Could > your new clause be simplified to > > if [ "$LOCALE" != C -a \( "$LOCALE" != en_US -o "$ARCH" = powerpc \) ]; then >pkginstall localization-config > fi Barely, yes. I have to admit that I was missing the exact appropriate syntax for conditional grouping in test...especially escaping the parentheses... However, the test should IMHO not be on LOCALE for en_US because in that case LOCALE could be en_US.UTF-8 or en_US.ISO-8859-1 as well as en_US alone and we probably don't want l-c to be installed there as well. So, the test becomes: if [ "$LOCALE" != C -a \ \( \ \( "$LANGUAGE" != en -o "$COUNTRYCODE" != US \) \ -o "$ARCH" = powerpc \ \) \ ]; then (not sure whether my indenting is correct) This resumes to: "if LOCALE is not C AND ((LANGUAGE not en or COUNTRY not US) or ARCH not ppc)"
Bug#277073: Patch to really fix this bug
On Mon, Jun 27, 2005 at 07:50:29AM +0200, Christian Perrier wrote: > In #277073, Konstantionos propsoed a patch for languagechooser to have > it trigger the install of localization-config when the "locale" is not > en_US or when the architecture is powerpc. > > This patch was however completely wrong as it attempted using a > non-existent LANG variable. So Joey reverted it...and it went > forgotten. > > However, the patch remained applied to localechooser, so we currently > have a "broken" localechooser, which always installs l-c (and Joey > mentioned this was breaking ia64). > > The attached patch attempts to do what Konstantinos requested. > > When compared to the former proposed patch, changes are: > > -not use undefined LANG anymore. Use LANGUAGE and COUNTRYCODE instead > -move the test *after* the country selection step > > I will test this patch more thoroughly. Please consider it UNTESTED at > this moment. > > diff -Nru localechooser.ori/localechooser localechooser/localechooser > --- localechooser.ori/localechooser 2005-06-27 07:43:24.0 +0200 > +++ localechooser/localechooser 2005-06-27 07:42:52.0 +0200 > @@ -247,14 +247,6 @@ > pkginstall iso-codes > fi > > -# Install localization-config only if LANG != en_US or > -# arch is powerpc. > -if [ "$LANGUAGE" != "C" ] ; then > - if [ "$LANG" != "en_US" -o "$ARCH" = "powerpc" ]; then > - pkginstall localization-config > - fi > -fi > - > # Other language specific packages > case "$LANGUAGE" in > ja|ko|ko_KR|el|zh|zh_CN|zh_TW|bg) > @@ -449,6 +441,21 @@ > log "Set $languagecode = '$LANGUAGELIST'" > fi > > +# Install localization-config only if "LANG"" != en_US or > +# arch is powerpc. > +# LANG is NOT defined here so we use LANGUAGE AND COUNTRY > +# This is made here because we also need the country choice > +if [ "$LANGUAGE" != "C" ] ; then > + if [ "$LANGUAGE" != "en" -o "$COUNTRYCODE" != "US" ]; then > + pkginstall localization-config > + else > + if [ "$ARCH" = "powerpc" ]; then > + pkginstall localization-config > + fi > + fi > +fi The previous test checks whether $LOCALE is not equal to C. Could your new clause be simplified to if [ "$LOCALE" != C -a \( "$LOCALE" != en_US -o "$ARCH" = powerpc \) ]; then pkginstall localization-config fi ? -- Matt signature.asc Description: Digital signature
Bug#277073: Patch to really fix this bug
In #277073, Konstantionos propsoed a patch for languagechooser to have it trigger the install of localization-config when the "locale" is not en_US or when the architecture is powerpc. This patch was however completely wrong as it attempted using a non-existent LANG variable. So Joey reverted it...and it went forgotten. However, the patch remained applied to localechooser, so we currently have a "broken" localechooser, which always installs l-c (and Joey mentioned this was breaking ia64). The attached patch attempts to do what Konstantinos requested. When compared to the former proposed patch, changes are: -not use undefined LANG anymore. Use LANGUAGE and COUNTRYCODE instead -move the test *after* the country selection step I will test this patch more thoroughly. Please consider it UNTESTED at this moment. -- diff -Nru localechooser.ori/localechooser localechooser/localechooser --- localechooser.ori/localechooser 2005-06-27 07:43:24.0 +0200 +++ localechooser/localechooser 2005-06-27 07:42:52.0 +0200 @@ -247,14 +247,6 @@ pkginstall iso-codes fi -# Install localization-config only if LANG != en_US or -# arch is powerpc. -if [ "$LANGUAGE" != "C" ] ; then - if [ "$LANG" != "en_US" -o "$ARCH" = "powerpc" ]; then - pkginstall localization-config - fi -fi - # Other language specific packages case "$LANGUAGE" in ja|ko|ko_KR|el|zh|zh_CN|zh_TW|bg) @@ -449,6 +441,21 @@ log "Set $languagecode = '$LANGUAGELIST'" fi +# Install localization-config only if "LANG"" != en_US or +# arch is powerpc. +# LANG is NOT defined here so we use LANGUAGE AND COUNTRY +# This is made here because we also need the country choice +if [ "$LANGUAGE" != "C" ] ; then + if [ "$LANGUAGE" != "en" -o "$COUNTRYCODE" != "US" ]; then + pkginstall localization-config + else + if [ "$ARCH" = "powerpc" ]; then + pkginstall localization-config + fi + fi +fi + + # Third step : ask for a locale at medium priority # We will choose it among the supported locales