Debconf readline frontend does not show options
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
debconf (Debian) |
Fix Released
|
Unknown
|
|||
debconf (Ubuntu) |
Fix Released
|
High
|
Heitor Alves de Siqueira | ||
Xenial |
Fix Released
|
High
|
Heitor Alves de Siqueira | ||
Bionic |
Fix Released
|
High
|
Heitor Alves de Siqueira | ||
Cosmic |
Fix Released
|
High
|
Heitor Alves de Siqueira | ||
Disco |
Fix Released
|
High
|
Heitor Alves de Siqueira | ||
Eoan |
Fix Released
|
High
|
Heitor Alves de Siqueira |
Bug Description
[Impact]
debconf prompts the user for input before displaying options
[Description]
When upgrading packages with apt or dpkg, debconf scripts are ran through 'run-parts' with the '--report' flag. This causes script output to be handled through pipes set up by run-parts, and buffers output from maintainer scripts nicely for formatting.
If debconf makes use of the readline frontend, any prompts will bypass the run-parts buffers and be displayed directly to /dev/tty. This generally causes the prompt to be displayed before the user gets any of the available options for it, and printing will block until the user inputs a valid option.
Upstream commit: https:/
[Test Case]
1) Deploy a VM through e.g. uvt-kvm
$ uvt-kvm create disco release=disco
2) Remove the whiptail package to force the readline frontend in debconf
root@disco:~# apt remove --purge whiptail -y
3) Install grub-legacy-ec2 and prepare /boot/grub/menu.lst for an upgrade through run-parts
root@disco:~# apt update && apt install -y grub-legacy-ec2
root@disco:~# rm -f /boot/grub/
root@disco:~# touch -d "4 years ago" /boot/grub/menu.lst
4) Invoke run-parts as in a kernel upgrade (kernel version doesn't matter, we just need it to think menu.lst needs an upgrade)
root@disco:~# run-parts --exit-on-error --arg=5.0.0 /etc/kernel/
...
/etc/kernel/
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/
debconf: falling back to frontend: Readline
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
What would you like to do about menu.lst?
The "What would you like to do about menu.lst?" prompt will block until the user enter a valid option, even though it's being displayed before the available options.
[Regression Potential]
We could hit regressions if changing debconf's printing to /dev/tty is expected by other programs. The changes are needed only in the readline frontend, so that would minimize impact of any possible regressions. The fixes will be thoroughly tested with autopkgtest and use-case scenarios.
# # # #
[Original Description]
When upgrading the kernel on a recent Bionic minimal image, the user is prompted to resolve a conflict in the file /boot/grub/
The minimal images do not have dialog/whiptail installed, so debconf falls back to using the readline frontend.
The user sees the prompt: "What would you like to do about menu.lst?" but is not presented with the list of options to choose from.
If a valid option is typed in, debconf will continue processing correctly and the list of options appears on the screen. See also https:/
STEPS TO REPRODUCE:
Launch the minimal Bionic image with serial 20190212 http://
for example via multipass and run `apt-get update` and `apt-get dist-upgrade`.
tags: | added: id-5c919ca2a4ae741f19d59ad9 |
Changed in debconf (Ubuntu): | |
importance: | Undecided → High |
Changed in debconf (Ubuntu Disco): | |
status: | New → Confirmed |
Changed in debconf (Ubuntu Cosmic): | |
status: | New → Confirmed |
Changed in debconf (Ubuntu Bionic): | |
status: | New → Confirmed |
Changed in debconf (Ubuntu Xenial): | |
status: | New → Confirmed |
Changed in debconf (Ubuntu Disco): | |
importance: | Undecided → Medium |
importance: | Medium → High |
Changed in debconf (Ubuntu Bionic): | |
importance: | Undecided → High |
Changed in debconf (Ubuntu Cosmic): | |
importance: | Undecided → High |
Changed in debconf (Ubuntu Xenial): | |
importance: | Undecided → High |
Changed in debconf (Ubuntu Eoan): | |
assignee: | nobody → Heitor Alves de Siqueira (halves) |
Changed in debconf (Ubuntu Disco): | |
assignee: | nobody → Heitor Alves de Siqueira (halves) |
Changed in debconf (Ubuntu Cosmic): | |
assignee: | nobody → Heitor Alves de Siqueira (halves) |
Changed in debconf (Ubuntu Bionic): | |
assignee: | nobody → Heitor Alves de Siqueira (halves) |
Changed in debconf (Ubuntu Xenial): | |
assignee: | nobody → Heitor Alves de Siqueira (halves) |
description: | updated |
tags: | added: sts |
Changed in debconf (Debian): | |
status: | Unknown → New |
Changed in debconf (Debian): | |
status: | New → Fix Committed |
description: | updated |
Changed in debconf (Ubuntu Eoan): | |
status: | Confirmed → Fix Released |
Changed in debconf (Debian): | |
status: | Fix Committed → Fix Released |
tags: | added: sts-sponsor-ddstreet |
tags: | added: patch-accepted-debian |
Status changed to 'Confirmed' because the bug affects multiple users.