On Mon, Nov 15, 2010 at 05:33:15AM +0100, Samuel Thibault wrote: > > http://dept-info.labri.fr/~thibault/tmp/mini.iso > > Could people please give it a try?
I was unable to test it but I read the code. Now I am even more convinced that it is not an easy thing to do to provide console-setup with a comprehensible all-in-one layouts-question. Here are my comments. > 3) > - if \ > + if [ -f /usr/share/console-setup-mini/keyboard ]; then > + # ask simplified layout question in Debian installer > + db_input critical keyboard-configuration/xkb-keymap || true > + if db_go; then > + STATE=$(($STATE + 1)) > + else > + STATE=$(($STATE - 1)) > + fi > + db_get keyboard-configuration/xkb-keymap > + keymap="$RET" > + layout="${keymap%(*}" > + variant="${keymap#$layout}" > + variant="${variant%)}" > + variant="${variant#(}" > + default_layout="$layout" > + default_variant="$variant" > + db_set keyboard-configuration/layoutcode "$layout" > + db_fset keyboard-configuration/layout seen true > + db_set keyboard-configuration/variantcode "$variant" > + db_fset keyboard-configuration/variant seen true What is the point of db_setting layoutcode and variantcode here? Won't these be overwritten in step 4? (If not, then the code is wrong for the non-latin languages). > - db_beginblock > - if [ "$latin" = no ]; then > - db_input high keyboard-configuration/toggle || true > - db_input medium keyboard-configuration/switch || true > - fi > - db_input medium keyboard-configuration/altgr || true > - db_input medium keyboard-configuration/compose || true > - if [ -f /usr/bin/X ]; then > - db_input medium keyboard-configuration/ctrl_alt_bksp || true > - fi > - db_endblock > + if [ -f /usr/share/console-setup-mini/keyboard ]; then > + # skip the questions without making Debconf loop > + STATE=$(( $STATE + $STATE - $old_state )) > + else > + db_beginblock > + if [ "$latin" = no ]; then > + db_input high keyboard-configuration/toggle || true > + db_input medium keyboard-configuration/switch || true > + fi > + db_input medium keyboard-configuration/altgr || true > + db_input medium keyboard-configuration/compose || true > + if [ -f /usr/bin/X ]; then > + db_input medium keyboard-configuration/ctrl_alt_bksp || > true > + fi > + db_endblock These questions (or at least one of them) must be asked by d-i. Notice the high priority of the keyboard-configuration/toggle question for the non-latin languages. > +Template: keyboard-configuration/xkb-keymap > +Type: select > +Choices-C: us, by, be, br(abnt2), br, gb, bg(bds), ca, ca(multi), > hr, cz, dk, nl, us(dvorak), ee, fi(fi), fr(latin9), de, gr, il, hu, > is, it, jp, kg, latam, lv, lt, mk, no, pl, pt, ro, ru, rs(latin), sk, > si, es, se(basic), ch(fr), ch(de), th, tr(f), tr, ua This list is missing the various Indian layouts, Georgian, Hebrew, Arabic, Chinese, etc. Even some Latin languages that are supported on the console but only by console-setup and not by console-data (such as Vietnamese) are missing here. For Bulgarian it is imperative to add 'bg(phonetic)'. > 3) > - if \ > + if [ -f /usr/share/console-setup-mini/keyboard ]; then > + # ask simplified layout question in Debian installer > > [...] > > + elif \ > [ "$unsupported_layout" = yes \ > -o "$default_variant" != other ] > then This simplified question is going to be asked not only in d-i but also by keyboard-configuration if console-setup-mini is installed (and in general this is ok because it would help if one is able to test the udeb as a standalone package also). The problems: 1. the layout in /etc/default/keyboard will be overwritten if it is not included in the list of keyboard-configuratin/xkb-keymap. 2. the same can happen in the udeb if the user uses preseeding. It would help partially to skip this question when the layout is not supported (i.e. to swap the if's of the quoted code above). Even then the problem will remain for layouts that are supported by console-setup but not by the new simplified question. Anton Zinoviev -- To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20101115113850.ga15...@debian.lan