Samuel Thibault, le Tue 14 Feb 2012 01:51:26 +0100, a écrit :
> Samuel Thibault, le Tue 14 Feb 2012 01:48:15 +0100, a écrit :
> > Samuel Thibault, le Mon 06 Feb 2012 03:00:36 +0100, a écrit :
> > > Here is a patch proposal, untested unfortunately because it seems I
> > > can't get to build a working d-i ATM.
> > 
> > And it was bogus of course, here is a fixed version.
> 
> I had forgotten the templates change, fixed patch attached.

So, Anton, are you OK with the patch (here rediffed)?  If we don't fix
this issue that'll be a regression from kbdchooser.

> > > Please do not commit it anyway because we need to synchronize with d-i
> > > translations to avoid pushing the new string to translators.

Still applies.

Samuel
diff --git a/debian/keyboard-configuration.config 
b/debian/keyboard-configuration.config
index b6d2afe..8f8f342 100644
--- a/debian/keyboard-configuration.config
+++ b/debian/keyboard-configuration.config
@@ -303,6 +303,20 @@ guess_arch () {
 #     fi
 # }
 
+# TODO: kfreebsd
+serial_console() {
+    if grep -q "User Mode Linux" /proc/cpuinfo
+    then
+       return 0
+    fi
+
+    console=`head -n 1 /proc/consoles | cut -d ' ' -f 1`
+    case $console in
+      ttyS*|ttys*|ttyUSB*) return 0;;
+      *) return 1;;
+    esac
+}
+
 if type locale 2>/dev/null >/dev/null; then
     eval `locale`
 fi
@@ -1197,7 +1211,14 @@ while :; do
        3)
            if [ "$is_debian_installer" ]; then
                # ask simplified layout question in Debian installer
-               db_input critical keyboard-configuration/xkb-keymap || true
+               priority=critical
+               if serial_console
+               then
+                   # Serial console, almost certainly skip configuration
+                   db_set keyboard-configuration/xkb-keymap skip-config
+                   priority=low
+               fi
+               db_input $priority keyboard-configuration/xkb-keymap || true
                if db_go; then 
                    STATE=$(($STATE + 1))
                else
@@ -1205,6 +1226,10 @@ while :; do
                fi
                db_get keyboard-configuration/xkb-keymap
                keymap="$RET"
+               if [ "$keymap" = skip-config ]
+               then
+                       exit 0
+               fi
                layout="${keymap%(*}"
                variant="${keymap#$layout}"
                variant="${variant%)}"
diff --git a/debian/keyboard-configuration.templates 
b/debian/keyboard-configuration.templates
index 35919d1..5b74542 100644
--- a/debian/keyboard-configuration.templates
+++ b/debian/keyboard-configuration.templates
@@ -165,9 +165,9 @@ _Description: Use Control+Alt+Backspace to terminate the X 
server?
 
 Template: keyboard-configuration/xkb-keymap
 Type: select
-Choices-C: us, al, ara, es(ast), bd, by, in(ben), be, ba, br, gb, bg, 
bg(phonetic), ca, ca(multi), es(cat), cn, hr, cz, dk, nl, us(dvorak), bt, epo, 
ee, et, fi, fr(latin9), ge, de, gr, in(guj), in(jhelum), il, in(deva), hu, is, 
ie, it, jp, in(kan), kz, kh, kg, kr, tr(ku_f), tr(ku), la, latam, lv, lt, mk, 
in(mal), np, no(smi), no, ir, pl, pt, in(guru), ro, ru, rs(latin), pk(snd), lk, 
sk, si, es, se, ch(fr), ch, in(tam), in(tel), th, tr(f), tr, ua, cn(uig), vn
+Choices-C: skip-config, us, al, ara, es(ast), bd, by, in(ben), be, ba, br, gb, 
bg, bg(phonetic), ca, ca(multi), es(cat), cn, hr, cz, dk, nl, us(dvorak), bt, 
epo, ee, et, fi, fr(latin9), ge, de, gr, in(guj), in(jhelum), il, in(deva), hu, 
is, ie, it, jp, in(kan), kz, kh, kg, kr, tr(ku_f), tr(ku), la, latam, lv, lt, 
mk, in(mal), np, no(smi), no, ir, pl, pt, in(guru), ro, ru, rs(latin), pk(snd), 
lk, sk, si, es, se, ch(fr), ch, in(tam), in(tel), th, tr(f), tr, ua, cn(uig), vn
 #flag:partial
-__Choices: American English, Albanian, Arabic, Asturian, Bangladesh, 
Belarusian, Bengali, Belgian, Bosnian, Brazilian, British English, Bulgarian, 
Bulgarian (phonetic layout), Canadian French, Canadian Multilingual, Catalan, 
Chinese, Croatian, Czech, Danish, Dutch, Dvorak, Dzongkha, Esperanto, Estonian, 
Ethiopian, Finnish, French, Georgian, German, Greek, Gujarati, Gurmukhi, 
Hebrew, Hindi, Hungarian, Icelandic, Irish, Italian, Japanese, Kannada, Kazakh, 
Khmer, Kirghiz, Korean, Kurdish (F layout), Kurdish (Q layout), Lao, Latin 
American, Latvian, Lithuanian, Macedonian, Malayalam, Nepali, Northern Sami, 
Norwegian, Persian, Polish, Portuguese, Punjabi, Romanian, Russian, Serbian 
(Cyrillic), Sindhi, Sinhala, Slovak, Slovenian, Spanish, Swedish, Swiss French, 
Swiss German, Tamil, Telugu, Thai, Turkish (F layout), Turkish (Q layout), 
Ukrainian, Uyghur, Vietnamese
+__Choices: Do not configure keyboard; keep kernel keymap, American English, 
Albanian, Arabic, Asturian, Bangladesh, Belarusian, Bengali, Belgian, Bosnian, 
Brazilian, British English, Bulgarian, Bulgarian (phonetic layout), Canadian 
French, Canadian Multilingual, Catalan, Chinese, Croatian, Czech, Danish, 
Dutch, Dvorak, Dzongkha, Esperanto, Estonian, Ethiopian, Finnish, French, 
Georgian, German, Greek, Gujarati, Gurmukhi, Hebrew, Hindi, Hungarian, 
Icelandic, Irish, Italian, Japanese, Kannada, Kazakh, Khmer, Kirghiz, Korean, 
Kurdish (F layout), Kurdish (Q layout), Lao, Latin American, Latvian, 
Lithuanian, Macedonian, Malayalam, Nepali, Northern Sami, Norwegian, Persian, 
Polish, Portuguese, Punjabi, Romanian, Russian, Serbian (Cyrillic), Sindhi, 
Sinhala, Slovak, Slovenian, Spanish, Swedish, Swiss French, Swiss German, 
Tamil, Telugu, Thai, Turkish (F layout), Turkish (Q layout), Ukrainian, Uyghur, 
Vietnamese
 _Description: Keymap to use:
 
 Template: keyboard-configuration/modelcode

Reply via email to