[Bug 13130] Re: Debconf uninitialized variable

soletan 13130 at bugs.launchpad.net
Sun Jul 29 11:18:52 UTC 2012


Using Ubuntu 12.0.4 LTS I'm facing this issue for some days now. Since
I'm working remotely some installation tends to freeze not reacting on
Ctrl+C, Ctrl+D or anything like that. So I have to drop the connection
more and more frequently.

I'm currently developing script for automatically installing a larger
software consisting of several apt packages involved and fetched into
system automatically. So I'm using debconf-set-selections to prevent
several interactions of debconf due to repeatedly asking for equivalent
information otherwise. Maybe this has corrupted debconf databases and so
I'm also interested in opportunities for doing integration tests and
diagnostics on debconf databases

Here is output seen on installing single packages such as nslcd:

Use of uninitialized value $value in substitution (s///) at /usr/share/perl5/Debconf/Format/822.pm line 65, <$fh> line 1.
Use of uninitialized value $value in substitution (s///) at /usr/share/perl5/Debconf/Format/822.pm line 65, <$fh> line 2.
Use of uninitialized value $value in substitution (s///) at /usr/share/perl5/Debconf/Format/822.pm line 65, <$fh> line 3.
Use of uninitialized value $item in hash element at /usr/share/perl5/Debconf/DbDriver/Pipe.pm line 47, <$fh> chunk 3.

Upgraded system recently. Running "sudo apt-get install nslcd" currently
deadlocks after triggering man-db.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to debconf in Ubuntu.
https://bugs.launchpad.net/bugs/13130

Title:
  Debconf uninitialized variable

Status in “debconf” package in Ubuntu:
  Fix Released

Bug description:
  I get the following when installing/removing packages:

  Use of uninitialized value in substitution (s///) at
  /usr/share/perl5/Debconf/Format/822.pm line 57, <$__ANONIO__> line 1.
  Use of uninitialized value in substitution (s///) at
  /usr/share/perl5/Debconf/Format/822.pm line 57, <$__ANONIO__> line 4.
  Use of uninitialized value in substitution (s///) at
  /usr/share/perl5/Debconf/Format/822.pm line 57, <$__ANONIO__> line 5.
  Use of uninitialized value in substitution (s///) at
  /usr/share/perl5/Debconf/Format/822.pm line 57, <$__ANONIO__> line 6.
  Use of uninitialized value in hash element at
  /usr/share/perl5/Debconf/DbDriver/File.pm line 51, <$__ANONIO__> chunk 15.

  I'm no expert but it seems to be related to the following bit of code
  in 822.pm:

  my $invars=0;
  my $line;
  while ($line = <$fh>) {
          chomp $line;
          last if $line eq ''; # blank line is our record delimiter
          if ($invars) {
                  if ($line =~ /^\s/) {
                          $line =~ s/^\s+//;
                          my ($var, $value)=split(/\s*=\s?/, $line, 2);
                          $value=~s/\\n/\n/g;
                          $ret{variables}->{$var}=$value;
                          next;
                  }
                  else {
                          $invars=0;
                  }
          }
          ... blah, blah, blah ...
  }

  IIRC $invars=0 will cause it to evaluate to boolean false, in which case it will
  get set to 0 again which makes no sense. Because $invars is set to 0 this means
  that the first code block of the if statement gets skipped and $value doesn't
  get set which leads to an error when we get to:

  elsif (length $key) {
          $value=~s/\\n/\n/g;
          $ret{fields}->{$key}=$value;
  }

  So it looks to my untrained eye as if $invars should initially be set
  to 1.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/debconf/+bug/13130/+subscriptions




More information about the foundations-bugs mailing list