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

Colin Watson cjwatson at debian.org
Mon Mar 10 12:03:54 GMT 2025


On Sun, Mar 09, 2025 at 09:39:29PM -0700, Josh Triplett wrote:
>On Sun, 9 Mar 2025 12:34:17 +0000 Colin Watson <cjwatson at debian.org> wrote:
>> 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.

Yes, I think this is pretty much my reasoning.

>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?

Readline inherits from Teletype (see the `use base` near the top of 
Debconf::FrontEnd::Readline), so checking in the parent class is
enough.

Thanks for checking.  I'll get this into unstable today.

-- 
Colin Watson (he/him)                              [cjwatson at debian.org]



More information about the Debconf-devel mailing list