Sorry for my long delay in replying to this. On Mon, Sep 30, 2024 at 02:47:53PM -0700, Josh Triplett wrote: > I've written a draft patch for this, at > https://salsa.debian.org/pkg-debconf/debconf/-/merge_requests/18 . I've > also attached it here. > > I'm happy to try other approaches for this, as well; this was the > simplest.
I'm trying to understand what's going on with the original setup before going ahead with this. Your original report shows that the Readline frontend (based on Teletype) is being used, but Debconf::FrontEnd::Readline already has a `-t STDIN` check. So your commit message comments about not having a TTY don't seem quite accurate: it looks as though the situation is that you _do_ have a TTY (at least enough for `-t STDIN` to succeed) but that it's broken and reads from it always return EOF. Does this sound right? (It sounds quite weird to me, and might point to a bug in your setup.) It would be helpful for me to have a reproducer for this. If I just try `env -u TERM apt install tzdata </dev/null`, I get behaviour that, while somewhat buggy, is not the same as what you reported and doesn't result in a hang: Setting up tzdata (2024b-4) ... debconf: unable to initialize frontend: Dialog debconf: (TERM is not set, so the dialog frontend is not usable.) debconf: falling back to frontend: Readline debconf: unable to initialize frontend: Readline debconf: (This frontend requires a controlling tty.) debconf: falling back to frontend: Teletype Configuring tzdata ------------------ Please select the geographic area in which you live. Subsequent configuration questions will narrow this down by presenting a list of cities, representing the time zones in which they are located. 1. Africa 3. Antarctica 5. Asia 7. Australia 9. Indian 11. Etc 2. America 4. Arctic 6. Atlantic 8. Europe 10. Pacific Geographic area: Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/DbDriver/Stack.pm line 112. Current default time zone: '/UTC' Local time is now: Sun Dec 29 14:35:42 UTC 2024. Universal Time is now: Sun Dec 29 14:35:42 UTC 2024. Run 'dpkg-reconfigure tzdata' if you wish to change it. Use of uninitialized value $val in substitution (s///) at /usr/share/perl5/Debconf/Format/822.pm line 84, <GEN6> line 4. Use of uninitialized value $val in concatenation (.) or string at /usr/share/perl5/Debconf/Format/822.pm line 85, <GEN6> line 4. #723843 is also somewhat related here, although without a reproducer I'm not quite sure whether it would fix your problem. Thanks, -- Colin Watson (he/him) [cjwat...@debian.org]