[Debconf-devel] Bug#928182: debconf: readline frontend does not show options before prompting user

Heitor Alves de Siqueira halves at canonical.com
Mon Apr 29 16:40:14 BST 2019


Hi Colin,

Thank you for taking a look at this one. It has been reported in
Launchpad as well [0].
A summary of how we can trigger this bug would be like this:

- dpkg/apt triggers a package upgrade
- some maintainer scripts are executed with the 'run-parts' tool using
the '--report' flag (e.g. the /etc/kernel/postinst.d scripts at the
end of [1])
- run-parts sets up pipes and captures stdout/stderr from debconf
- readline frontend prints prompt before run-parts can process the
options from stdout pipe

I belive we could fix this by forcing readline to always use stdout if
both stdout and stderr are pipes (since that most likely means debconf
is running under run-parts).
>From what I've tested, the attached patch works correctly for this
case. Do you think that patch would be an appropriate solution?

Thanks,
Heitor

[0] https://bugs.launchpad.net/bugs/1822270
[1] https://termbin.com/c92p
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-RFC-debconf-fix-readline-prompt-for-run-parts.patch
Type: text/x-patch
Size: 1081 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debconf-devel/attachments/20190429/97e055b6/attachment.bin>


More information about the Debconf-devel mailing list