[Debconf-devel] Bug#723843: debconf: uninitialized value on "EOF" (^D)
Benjamin Drung
bdrung at posteo.de
Mon Jan 9 18:32:01 GMT 2023
severity 723843 normal
tags 723843 + patch
thanks
Hi,
On Fri, 20 Sep 2013 13:46:57 +0200 Niels Thykier <niels at thykier.net>
wrote:
> On 2013-09-20 13:38, Niels Thykier wrote:
> > Package: debconf
> > Version: 1.5.51
> > Severity: minor
> >
> > Hi,
> >
> > During a "dpkg-reconfigure localepurge", I hit "EOF" (^D) to one of
> > the questions and it triggered a warning about using an
uninitialized
> > value. If it is relevant, I was using the "readline" frontend.
> >
> > """
> > Selecting locale files
> > Use of uninitialized value $_[1] in join or string at
/usr/share/perl5/Debconf/DbDriver/Stack.pm line 111.
> > You chose not to keep any locales. This means that all locales will
be removed from your system. Are you sure this really is what you want?
> > """
> >
> > ~Niels
> >
>
>
> So, turns out I can trigger similar warnings in other places too by
> ^D'ing the remaining questions (see warnings.log).
This is not only a warning, but a bug that breaks tzdata. ^D'ing the
debconf question or installing it without a TTY in a container will set
a broken timezone (luckily `/ETC` is a valid one, because `ETC` exists)
[1]:
When a user hits ^D on a `readline` or `teletype` front end,
`Debconf::FrontEnd::Teletype->prompt` will return `undef`. The function
description says: "Anything that uses this function should catch that
and handle it, probably by exiting any read/validate loop it is in."
Checking the return value of the `show` function in the `readline`
front end will fix the warning and revert to the backup (if the debconf
is backup capable) (see attached patch). The bug should probably be
fixed in a different location to also cover the `teletype` front end. I
leave this exercise to the maintainer since I already spend enough time
debugging.
[1] https://launchpad.net/bugs/1899343
--
Benjamin Drung
Debian & Ubuntu Developer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-uninitialized-value-on-EOF-D.patch
Type: text/x-patch
Size: 1749 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debconf-devel/attachments/20230109/a44e8bfe/attachment.bin>
More information about the Debconf-devel
mailing list