tags 343497 patch
thanks

Quoting Frans Pop ([EMAIL PROTECTED]):
> Package: localechooser
> Version: 0.24
> Severity: minor
> 
> Currently for some languages the installation of packages needed to 
> support that language after the reboot are scheduled for installation in 
> the main localechooser script.
> 
> IMO it would be better to move these to the prebaseconfig script so they 
> will not be scheduled for installation if the user later goes back, runs 
> localechooser again and selects a different language that does not need 
> the extra packages.
> (This would also improve maintainability of the localechooser script by 
> limiting it to its core functions.)


The attached patch is a first attempt to solve this issue.

I made some early tests and it should be fine.

It also improves the way console-terminus is installed: instead of
hardcoding it for some languages, the package is installed when the
"kbd=" entry in languagelist mentions a Terminus font (names always
begin with "ter-").

I do not apply it in current localechooser as this change would be
likely to break it....and we agreed on avoiding risky changes before
beta2 now.


diff -Nru localechooser/localechooser localechooser.new/localechooser
--- localechooser/localechooser 2005-12-19 18:24:45.611447961 +0100
+++ localechooser.new/localechooser     2005-12-16 18:26:07.089672451 +0100
@@ -262,59 +262,6 @@
 log "Set debconf/language = '$LANGUAGELIST'"
 
 
-# Install specific packages depending on selected language
-
-# Enable translations (if this is present, base-config generates the
-# required locale on boot)
-# We use belocs-locales-data for languages which don't have a locale
-# in the locales package
-if [ "$LOCALE" != "C" ] ; then
-       case "$LANGUAGE" in
-           ku|sa)
-               pkginstall belocs-locales-data
-               pkginstall belocs-locales-bin
-               ;;
-           *)
-               pkginstall locales
-               ;;
-       esac
-
-       # Unicode font for languages requiring it
-       case "$LANGUAGE" in
-           ar|el|fa|he|ja|ko|ku|tr|vi|wo|zh)
-               anna-install bterm-unifont
-               ;;
-       esac
-
-       if [ "$LANGUAGE" != "en" ] ; then
-               pkginstall iso-codes
-       fi
-
-       # Other language specific packages
-       case "$LANGUAGE" in
-           ja|ko|ko_KR|el|zh|zh_CN|zh_TW|bg|vi|wo)
-               # Japanese, Korean, Greek, Chinese, Bulgarian
-               pkginstall jfbterm
-               pkginstall unifont
-               ;;
-#          ru)
-#              # Russian
-#              pkginstall console-cyrillic
-#              pkginstall console-terminus
-#              ;;
-           tr|ku|ro)
-               # Turkish, Kurdish, Romanian
-               pkginstall console-terminus
-               ;;
-           ar|he|fa)
-               # RTL languages (Arabic, Hebrew, Farsi)
-               pkginstall jfbterm
-               pkginstall unifont
-               pkginstall libfribidi0
-               ;;
-       esac
-fi
-
 
 # BEGIN COUNTRY SELECTION
 
diff -Nru localechooser/prebaseconfig localechooser.new/prebaseconfig
--- localechooser/prebaseconfig 2005-12-19 18:24:44.911590329 +0100
+++ localechooser.new/prebaseconfig     2005-12-16 18:26:02.694566842 +0100
@@ -12,6 +12,57 @@
        fi
 }
 
+db_get debian-installer/locale || true
+LANGUAGE=${RET%%_*}
+
+# Install specific packages depending on selected language
+
+# Enable translations (if this is present, base-config generates the
+# required locale on boot)
+# We use belocs-locales-data for languages which don't have a locale
+# in the locales package
+if [ "$LOCALE" != "C" ] ; then
+       # Which locale package to install
+       case "$LANGUAGE" in
+           ku|sa)
+               pkginstall belocs-locales-data
+               pkginstall belocs-locales-bin
+               ;;
+           *)
+               pkginstall locales
+               ;;
+       esac
+
+       # Unicode font for languages requiring it
+       case "$LANGUAGE" in
+           ar|el|fa|he|ja|ko|ku|tr|vi|wo|zh)
+               anna-install bterm-unifont
+               ;;
+       esac
+
+       # FIXME: why this?
+       if [ "$LANGUAGE" != "en" ] ; then
+               pkginstall iso-codes
+       fi
+
+       # Other language specific packages
+       case "$LANGUAGE" in
+           ja|ko|ko_KR|el|zh|zh_CN|zh_TW|bg|vi|wo)
+               # Languages needing jfbterm in 2nd stage
+               pkginstall jfbterm
+               pkginstall unifont
+               ;;
+           ar|he|fa)
+               # RTL languages (Arabic, Hebrew, Farsi)
+               pkginstall jfbterm
+               pkginstall unifont
+               pkginstall libfribidi0
+               ;;
+       esac
+fi
+
+
+
 db_get debian-installer/consoledisplay || true
 consoletype=`echo $RET | sed -e 's/=.*$//'`
 case "$consoletype" in
@@ -43,6 +94,9 @@
                        echo "SCREEN_FONT_vc5=$consolefont" >>$ctconfig
                        echo "SCREEN_FONT_vc6=$consolefont" >>$ctconfig
                fi
+               if echo "$consolefont" | grep -q "^ter-"; then
+                       apt-install console-terminus
+               fi
        fi
        ;;
     cyr)

Reply via email to