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

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.

Anton Zinoviev
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 @@
 ARCH=`udpkg --print-architecture`
-modify_cyrconfig() {
-	if [ "$2" ]; then
-		sed -e "s/^$1 .*\$/$1 $2/" \
-		    $cyrconfig > $cyrconfig.tmp && \
-		    mv $cyrconfig.tmp $cyrconfig
-	fi
 db_get debian-installer/locale
@@ -82,6 +74,10 @@
 	apt-install console-cyrillic || true
+    console-setup)
+	apt-install console-setup || true
+	db_set debian-installer/keymap '' || true
+	;;
 exit 0
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.
 # Language;supported_environments;langcode;countrycode;fallbacklocale;langlist;console-data
 # 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..:-)
 #X Icelandic;1;is;IS;is_IS.UTF-8;;kbd=lat9u-16(utf8)
@@ -44,18 +44,18 @@
 #X Kannada;4;kn;IN;kn_IN;;
-#X Kazakh;2;kk;KZ;kk_KZ;;kbd=ruscii_8x16(koi8-r)
+#X Kazakh;2;kk;KZ;kk_KZ;;console-setup
-#X Lao;4;lo;LA;lo_LA;;
+#X Lao;4;lo;LA;lo_LA;;console-setup
 #X Malagasy;1;mg;MG;mg_MG.UTF-8;mg_MG:fr_FR:fr:en;kbd=lat0-sun16(utf8)
 #X Malay;1;ms;MY;ms_MY.UTF-8;;kbd=lat0-sun16(utf8)
 #X Marathi;4;mr;IN;mr_IN;;
 # 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 @@
 Northern Sami;1;se;NO;se_NO.UTF-8;se_NO:nb_NO:nb:no_NO:no:nn_NO:nn:da:sv:en;kbd=lat0-sun(utf8)
 Norwegian Bokmaal;1;nb;NO;nb_NO.UTF-8;nb_NO:nb:no_NO:no:nn_NO:nn:da:sv:en;kbd=lat0-sun16(utf8)
 Norwegian Nynorsk;1;nn;NO;nn_NO.UTF-8;nn_NO:nn:no_NO:no:nb_NO:nb:da:sv:en;kbd=lat0-sun16(utf8)
-#X Persian;3;fa;IR;fa_IR;;kbd=iso06.f16(utf8)
+#X Persian;3;fa;IR;fa_IR;;console-setup
 Portuguese (Brazil);1;pt;BR;pt_BR.UTF-8;pt_BR:pt:en;kbd=lat1-16(utf8)
 Punjabi (Gurmukhi);4;pa;IN;pa_IN;;
 #X Sanskrit;4;sa;IN;sa_IN;;
 # Serbian commented for consistency: too incomplete
-#X Serbian;2;sr;CS;sr_YU.UTF-8@cyrillic;;kbd=iso05.f16(utf8)
+#X Serbian;2;sr;CS;sr_YU.UTF-8@cyrillic;;console-setup
@@ -80,12 +80,12 @@
 #X Telugu;4;te;IN;te_IN;;
-#X Urdu;3;ur;PK;ur_PK.UTF-8;;
+#X Urdu;3;ur;PK;ur_PK.UTF-8;;console-setup
 #X Valencian-Catalan;1;ca@valencia;ES;ca_ES.UTF-8@valencia;;kbd=lat0-sun16(utf8)
 #X Welsh;2;cy;GB;cy_GB.UTF-8;;kbd=iso14.f16(utf8)
 #X Xhosa;2;xh;ZA;xh_ZA.UTF-8;;kbd=lat0-sun16(utf8)

Reply to: