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

Bug#536614: Provides wrong information about the encoding of the locales



On Wednesday 18 November 2009, Anton Zinoviev wrote:
> On Sun, Nov 15, 2009 at 12:30:05PM +0100, Frans Pop wrote:
> > I see you're closing #536614 with this change. Does that mean that the
> > template debian-installer/charmap is now no longer used and can be
> > removed from localechooser?
>
> Yes, provided that when the postinst of console-setup is executed in
> base-system, the locales are installed and the command 'locale charmap'
> provides right information.

Yes, console-setup is currently being run from the post-base-installer 
script of kbd-chooser, which is run shortly after debootstrap and after 
the locales package has been installed.
And apt-install ensures the correct locale is used by setting LANG to the 
locale selected by the user (which also sets all the LC_* env vars).

I've tested this by booting the installer with 'locale=nl_NL@euro' and that 
results in 'CHARMAP="ISO-8859-15' in /target/etc/default/console-setup.

And because of the corrections to kbd-chooser' post-base-installer script 
done by the lenny-support udeb, the same also works for Lenny installs.

I've just committed the change below so we can really drop the template in 
localechooser. It is correct as D-I internally (in the D-I environment) is 
guaranteed to always use UTF-8.

So we now have the following issues fixed in the Squeeze installer, for 
both Squeeze _and_ Lenny installs:
- console-setup dialogs being displayed during base-installer when the
  package is being installed in the target environment
- keyboard selection from kbd-chooser not being set in target environment
  before console-setup is installed; this solves all the reports that users
  had an incorrect keymap after rebooting into the installed system
- incorrect charmap if user selects a legacy locale during installation

Note that these fixes only apply when kbd-chooser is used. I expect some 
changes will be needed in console-setup-udeb to also make it work for 
that.

Cheers,
FJP

--- console-setup.config        (revision 61346)
+++ console-setup.config        (working copy)
@@ -142,12 +142,8 @@
     locale=C
 fi

-if \
-    [ -d /lib/debian-installer ] \
-    && db_get debian-installer/charmap \
-    && [ "$RET" ]
-then
-    CHARMAP="$RET"
+if [ -d /lib/debian-installer ]; then
+    CHARMAP=UTF-8
 elif [ "$locale" = C ]; then
     CHARMAP=UTF-8
     charmap_priority=high



Reply to: