Re: About console-setup in d-i
On Tue, May 01, 2007 at 02:29:10PM +0200, Christian Perrier wrote:
> Well, that would have needed a plan, which didn't really happen. The
> manpower for console handling in D-I is very scarce.
The patch is attached. It activates console-setup for the non-Latin
languages as well as for some Latin. I suppose there are more Latin
languages that require console-setup, but the only three I noticed are
Esperanto (no keyboard), Lithuanian (the keyboard should work as if it
is non-Latin) and Vietnamese (no font, no keyboard). Console-setup
supports also the following official in at least one country non-Latin
languages: Armenian and Amharic (both are missing in languagelist).
> How? Just replace "apt-install console-cyrillic" by "apt-install
> console-setup" in localechooser's finish-install script?
First this and second - unset the value of the debian-installer/keymap
debconf template. (Otherwise console-setup won't ask questions about
the keyboard layout.)
> > The most important change in d-i before the udebs of console-setup can
> > be used is that console-setup needs 'loadkeys'. This means that the
> > console maintainers will have to make an udeb with loadkeys.
> You mean a udeb from console-tools, named "console-tools-udeb", with
> only loadkeys?
> If so, we should file this against console-tools.
Or it can be filed against 'kbd'.
> > The other change is inside localechooser. Console-setup needs
> > information about the encoding of the selected locale, or else it has
> > to ask the question about the encoding with critical priority. If
> > localechooser sets a template such as debian-installer/locale-encoding,
> > this should be enough.
> That should maybe be merged with Colin's proposed changes to
> localechooser. I remember him also talking about getting the encoding
> for a given locale as not all locales have the encoding in their name.
I don't know about the Colin's proposed changes, but I suppose they do
exactly what console-setup needs. He is the person in Ubuntu who
works for console-setup, he has prepared several patches for
console-setup and knows how it works.
> > I think that is all that needs to be done outside console-setup. If
> > d-i uses console-setup, then all console-related stuff can be (but
> > doesn't need to be) removed from localechooser.
> > The most difficult part inside console-setup is to make the
> > model/layout strings translatable. The X upstream provides
> > translations in a xml file but I have no idea how to use them.
> Here, I feel like we're desperately needing Denis Barbier who had all
> this knowledge..:-|
> However, is that needed? If I'm correct, Ubuntu uses a method to
> recognize the keyboard layout by asking users to type some keys. That
> could maybe be used to avoid prompting for the keyboard layout.
Yes, it is. Colin has filed a bug with a patch against console-setup,
but I haven't decided what to do with it yet. For now I am
considering to apply it in such a way that it works for Ubuntu and not
(yet) for Debian (in order to make the life of Colin easier).
The problem is that this metod can not distinguish among several
keyboard layouts. For example all Swiss layouts are identical.
Another problem is that too much time is required in order to compile
the question-tree. Ubuntu uses this method only for a relatively
short list of keyboards. I tried to apply the method for the list of
all layouts that this method can distinguish and after 30 hours there
were still no signs that the compilation was close to finish...
> > This is what I can not do:
> > - to fix the bugs promptly (for example translation-based uploads);
> I don't get the point here. Do you need help dealing with
> console-setup l10n and prepare packages?
The problem is that while I have enough time to fix the bugs in my
packages, I am unable to do this quick. While this is more or less
acceptable for my current packages, if console-setup becomes integral
part of d-i, it will require quick fixes of the bugs.
I wrote about translation-based uploads because I expect most future
bugs agains console-setup to be about translations or in the worst
case – about some specific keyboard layout.
diff -Naur localechooser/finish-install localechooser.new/finish-install
--- localechooser/finish-install 2007-05-01 16:35:10.000000000 +0300
+++ localechooser.new/finish-install 2007-05-01 17:21:46.000000000 +0300
@@ -6,14 +6,6 @@
- if [ "$2" ]; then
- sed -e "s/^$1 .*\$/$1 $2/" \
- $cyrconfig > $cyrconfig.tmp && \
- mv $cyrconfig.tmp $cyrconfig
@@ -82,6 +74,10 @@
apt-install console-cyrillic || true
+ apt-install console-setup || true
+ db_set debian-installer/keymap '' || true
diff -Naur localechooser/languagelist localechooser.new/languagelist
--- localechooser/languagelist 2007-05-01 16:35:10.000000000 +0300
+++ localechooser.new/languagelist 2007-05-01 17:35:38.000000000 +0300
@@ -2,12 +2,12 @@
# This is the complete list of languages (locales) to choose from.
# For C locale, set language to 'en' to make sure questions are "translated"
# to English instead of showing codes.
@@ -26,16 +26,16 @@
# The Esperanto locale *is* (or will be as of 1/11/2006) eo.UTF-8
# so no country on purpose. The default country is Antarctica because...
# ...why not..:-)
@@ -44,18 +44,18 @@
# The Sami translation is really incomplete. We however keep Sami on request
# of Skolelinux as a kind of reward to them..:-). They need to be able to
@@ -63,16 +63,16 @@
# Serbian commented for consistency: too incomplete
@@ -80,12 +80,12 @@