[Debconf-devel] Bug#1061480: debconf should automatically be noninteractive if input is /dev/null

Josh Triplett josh at joshtriplett.org
Mon Mar 10 04:39:29 GMT 2025


On Sun, 9 Mar 2025 12:34:17 +0000 Colin Watson <cjwatson at debian.org> wrote:
> On Sat, Mar 08, 2025 at 07:17:29AM -0800, Josh Triplett wrote:
> >Given that, the following command will reproduce this, and show the
> >output to the terminal:
> >systemd-run -P apt -y install wireshark-common </dev/null 2>&1 | cat
>
> Thanks for the reproducer!  That helps a lot.
>
> I'm more inclined to do something like the attached patch; my feeling is
> that it was probably a mistake that we put the `-t STDIN` check in
> Readline rather than in Teletype, and I'd rather fix that than add an
> additional prompt.  What do you think?  It works with your reproducer,
> automatically falling back to Noninteractive.

Works for me.

The main reason I'd avoided doing that was the thought that someone,
somewhere, might be using the teletype frontend with some kind of
install-scripting automation. (Such a setup would be a bad idea,
compared to pre-seeding debconf prior to installation, but people
develop all sorts of interesting workarounds for things and keep using
them as long as they work.)

However, I think in practice that's exceedingly unlikely, and if someone
really wants to keep doing it they could use a pty. Given that, I think
your patch is a much better solution.

I'm not clear why you're removing the `-t STDIN` check from the Readline
frontend, though; shouldn't *both* of those require a terminal? It
sounds like your tests show it falling all the way back to
Noninteractive, but what causes it to skip using Readline?

Thanks,
Josh



More information about the Debconf-devel mailing list