Bug#224509: Don't require a TTY during maintainer script execution
Julien Cristau <jcristau@debian.org> writes:
> On Fri, Aug 7, 2009 at 19:43:29 -0700, Russ Allbery wrote:
>> I think at this point, now that debconf is mandatory for all but
>> essential packages, removing the guarantee of a controlling terminal is
>> uncontroversial. This bug has been open for a while and I'd like to
>> put it to bed. Here's proposed wording. I'm looking for feedback or
>> seconds.
> what does this change mean for essential packages that want to prompt
> the user when debconf isn't available? E.g. libc6.postinst tries to use
> debconf, and if that's not available and $DEBIAN_FRONTEND !=
> noninteractive it prompts the user and reads stdin. I guess it's
> reasonable to expect dpkg frontends that don't provide a tty to set
> DEBIAN_FRONTEND, but maybe that should be spelled out?
It should be if that's something that packages can rely on. Does dpkg
always set that if the session is not interactive?
Otherwise, I would argue that the libc6.postinst script should instead run
tty and check its exit status to determine whether there's a controlling
terminal, and if not, take whatever non-interactive default it has.
--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>
Reply to: