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

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.000000000 +0200
+++ localechooser/localechooser	2005-06-27 07:42:52.000000000 +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

Reply to: