Re: [Hampshire] Errors when doing an aptitude safe-upgrade

Top Page

Reply to this message
Author: Graham Bleach
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Errors when doing an aptitude safe-upgrade
2008/11/28 john lewis <johnlewis@???>
>
> I had some corrupted files on my server following a power failure. I
> have managed to clear most of the errors dpkg found when doing an
> upgrade with the exception of the following
>
> Use of uninitialized value $value in substitution (s///)
> at /usr/share/perl5/Debconf/Format/822.pm line 65, <$__ANONIO__> line
> 3.


This perl module is having some problem dealing with the data it is
processing. So it's likely that the cause is not actually a corruption
of /usr/share/perl5/Debconf/Format/822.pm, but of a file whose
contents this perl modules tries to parse.

Unfortunately it's not immediately obvious which file is being read in
this case. If you pasted the full output from aptitude/apt-get we
might see some more clues about what it is trying to do when it falls
over.

Line 65 in that module looks like like this on my etch system:

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


Which version of Debian are you using and what do the lines
surrounding line 65 look like?


> Use of uninitialized value $item in hash element
> at /usr/share/perl5/Debconf/DbDriver/File.pm line 70, <$__ANONIO__>
> chunk 3.


I'm pretty sure that this error is caused by the first problem it encountered.

Unfortunately, I'm not familiar enough with the internals of debconf
to be able to work out the likely cause, but the error is being thrown
somewhere in the code that handles the debconf config database. You
might want to take a peek at the files in /var/cache/debconf/ and see
if you can see anything obviously wrong, such as zero length files. I
am not sure that it would be safe to replace these files with copies
from another system, though. If you have backups, comparing them with
the last known good backups would probably be useful.

A debconf expert would be able to diagnose this very quickly.

Cheers,
G