Unable to preseed language
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | localechooser (Ubuntu) |
Low
|
Mathieu Trudel-Lapierre | ||
Bug Description
Hello,
I'm trying to preseed a 14.04.2 installation with hands-off[0] and found a bug in do_pressed[1].
When looking up known languages[2] a $lang variable is used bug comes from nowhere (empty), I think it should be $ps_language.
I started an installation, pause it (thanks hands-off) and add some set -x in some script to debug.
Here are the logs from localechooser do_preseed line 162[3] to 179[4]:
Apr 29 12:35:47 main-menu[1595]: (process:31954): + [ fr ]
Apr 29 12:35:47 main-menu[1595]: (process:31954): + [ fr ]
Apr 29 12:35:47 main-menu[1595]: (process:31954): + has_choice localechooser/
Apr 29 12:35:47 main-menu[1595]: (process:31954): + local RET template value
Apr 29 12:35:47 main-menu[1595]: (process:31954): + template=
Apr 29 12:35:47 main-menu[1595]: (process:31954): + value=
Apr 29 12:35:47 main-menu[1595]: (process:31954): + [ ]
Apr 29 12:35:47 main-menu[1595]: (process:31954): + return 1
Apr 29 12:35:47 main-menu[1595]: (process:31954): + log Preseeded language ignored: unknown language code
Apr 29 12:35:47 main-menu[1595]: (process:31954): + logger -t localechooser info: Preseeded language ignored: unknown language code
Apr 29 12:35:47 main-menu[1595]: (process:31954): + [ FR ]
Apr 29 12:35:47 main-menu[1595]: (process:31954): + country_preseeded=1
Apr 29 12:35:47 debconf: --> SETTITLE localechooser/
Apr 29 12:35:47 debconf: <-- 0 OK
Apr 29 12:35:47 main-menu[1595]: (process:31954): + [ fr_FR.UTF-8 ]
Apr 29 12:35:47 main-menu[1595]: (process:31954): + grep -q ^fr_FR.UTF-8 /usr/share/
Apr 29 12:35:47 main-menu[1595]: (process:31954): + db_fset debian-
Apr 29 12:35:47 main-menu[1595]: (process:31954): + _db_cmd FSET debian-
Apr 29 12:35:47 main-menu[1595]: (process:31954): + IFS= printf %s\n FSET debian-
Apr 29 12:35:47 main-menu[1595]: (process:31954): + IFS=
Apr 29 12:35:47 main-menu[1595]: (process:31954): read -r _db_internal_line
Apr 29 12:35:47 main-menu[1595]: (process:31954): + RET=true
Apr 29 12:35:47 main-menu[1595]: (process:31954): + return 0
This results in not using the preseeded language[5]:
Apr 29 12:35:47 main-menu[1595]: (process:31954): + db_fget localechooser/
Apr 29 12:35:47 main-menu[1595]: (process:31954): + _db_cmd FGET localechooser/
Apr 29 12:35:47 main-menu[1595]: (process:31954): + IFS= printf %s\n FGET local
Apr 29 12:35:47 main-menu[1595]: (process:31954): + IFS=
Apr 29 12:35:47 main-menu[1595]: (process:31954): read -r _db_internal_line
Apr 29 12:35:47 main-menu[1595]: (process:31954): +
Apr 29 12:35:47 main-menu[1595]: (process:31954): RET=false
Apr 29 12:35:47 main-menu[1595]: (process:31954): + return 0
Apr 29 12:35:47 main-menu[1595]: (process:31954): + [ false = true ]
Apr 29 12:35:47 main-menu[1595]: (process:31954): + PREVIOUS_LANGUAGE=
Regards.
| Changed in localechooser (Ubuntu): | |
| status: | New → Incomplete |
| importance: | Undecided → Medium |
I'm easily able to reproduce this behavior in Debian and Ubuntu, and I'm not denying it looks like there is a bug here in localechooser code, one that we'll address.
However, I am able to preseed the language despite that error message showing up, so I'll further reduce the bug priority to Low.
FWIW, I've been using "language=fr" as a parameter added on the command-line, which is also equivalent to picking French in the menu for the Server CD. I've also tried the same on mini.iso (so, fairly similar to a PXE boot), with the same behavior. In all my tests, the installer *does* come up in french.
Could you please tell us more about the bug? Should we read from this that the resulting installed system does not come up in french?
I took the ubuntu-
I edited the preseed/
# Preseeding only locale sets language, country and locale.
d-i debian-
# The values can also be preseeded individually for greater flexibility.
d-i debian-
d-i debian-
# Keyboard selection.
# Disable automatic (interactive) keymap detection.
d-i console-
d-i keyboard-
# To select a variant of the selected layout (if you leave this out, the
# basic form of the layout will be used):
d-i keyboard-
I build the custom ISO image and boot it in KVM and at reboot my /etc/default/
XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT=""
XKBOPTIONS=""
The bug I found in localchooser is only responsible of printing a message which should not be printed, so this fix is purely cosmetic.
Regards.
| Changed in localechooser (Ubuntu): | |
| importance: | Medium → Low |
| Changed in localechooser (Ubuntu): | |
| status: | Incomplete → Confirmed |
Thanks, that clarifies it. I will fix this (and also fix it in Debian, since it seems to happen there as well).
| Changed in localechooser (Ubuntu): | |
| status: | Confirmed → Triaged |
| assignee: | nobody → Mathieu Trudel-Lapierre (mathieu-tl) |
I can set french keymap on Debian Jessie with:
# Preseeding only locale sets language, country and locale.
d-i debian-
# The values can also be preseeded individually for greater flexibility.
d-i debian-
d-i debian-
# Keyboard selection.
d-i keyboard-
Setting the variant to oss does not work:
# Keyboard selection.
d-i keyboard-
Debugging the Debian Jessie keymap selection, I see that it's handled by /usr/share/
I pause the installer and put a set -x on top of this script in Ubuntu and it's never called.
Hope it will help.
Regards.
Oh, sure that file will eventually get run; it's part of the tasks of keyboard-
Are you seeing that these settings aren't properly applied in the installer? If so, that would be bug 1447802. However, there is still the issue you reported in locale-chooser which is a valid issue that should be resolved, so I'd rather keep this bug around and not mark it a duplicate of the other, that way we can track the locale-chooser fix as well.


Could you please share the actual preseed file you're using, as well as whatever parameters you may be passing on the command-line? This would help in making sure I can accurately reproduce the bug as I test the fix.