Subject: Bug#998403: debconf: "Use of uninitialized value ...." when used with debconf-apt-progress --config settings

From: Amy Fong <[email-masked]>
Date: Wed, 03 Nov 2021 13:37:35 -0400

Package: debconf
Version: 1.5.77
Severity: normal

Dear Maintainer,

Scenario (or steps to reproduce):
1. remove libreoffice-calc libreoffice-writer
2. eval `debconf-apt-progress --config  `
3.  debconf-apt-progress --logfile /tmp/apt-get.log -- apt-get -fumy install libreoffice libreoffice-calc 

Observed error: 
Unpacking libreoffice (1:7.0.4-4+deb11u1) ...
Setting up libreoffice-writer (1:7.0.4-4+deb11u1) ...
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 86, <GEN7> chunk 1.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <GEN7> chunk 1.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <GEN7> chunk 1.
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 86, <GEN7> chunk 2.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <GEN7> chunk 2.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <GEN7> chunk 2.
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 86, <GEN7> chunk 3.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <GEN7> chunk 3.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <GEN7> chunk 3.
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 86, <GEN7> chunk 4.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <GEN7> chunk 4.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <GEN7> chunk 4.
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 86, <GEN7> chunk 5.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <GEN7> chunk 5.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <GEN7> chunk 5.

Creating config file /etc/libreoffice/registry/writer.xcd with new version
Setting up libreoffice-calc (1:7.0.4-4+deb11u1) ...
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 86, <GEN7> chunk 1.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <GEN7> chunk 1.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <GEN7> chunk 1.
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 86, <GEN7> chunk 2.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <GEN7> chunk 2.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <GEN7> chunk 2.
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 86, <GEN7> chunk 3.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <GEN7> chunk 3.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <GEN7> chunk 3.
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 86, <GEN7> chunk 4.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <GEN7> chunk 4.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <GEN7> chunk 4.
Use of uninitialized value $template in exists at /usr/share/perl5/Debconf/Template.pm line 86, <GEN7> chunk 5.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <GEN7> chunk 5.
Use of uninitialized value $item in exists at /usr/share/perl5/Debconf/DbDriver/Cache.pm line 40, <GEN7> chunk 5.

Observation: error observed in libreoffice packages utilizing ucf for maintaining configuration files.

-- System Information:
Debian Release: 11.0
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-8-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages debconf depends on:
ii  perl-base  5.32.1-4

Versions of packages debconf recommends:
ii  apt-utils     2.2.4
ii  debconf-i18n  1.5.77

Versions of packages debconf suggests:
pn  debconf-doc                <none>
pn  debconf-kde-helper         <none>
pn  debconf-utils              <none>
ii  libgtk3-perl               0.038-1
pn  libnet-ldap-perl           <none>
pn  libterm-readline-gnu-perl  <none>
ii  perl                       5.32.1-4
ii  whiptail                   0.52.21-4+b3

-- debconf information:
  debconf-apt-progress/title:
  debconf-apt-progress/info:
  debconf/frontend: Dialog
  debconf-apt-progress/media-change:
  debconf/priority: high
  debconf-apt-progress/preparing: