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

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)"





Reply to: