[Debconf-devel] Bug#651642: debconf: process_command does not properly skip blank input lines.
Bob Vincent
bobvin at pillars.net
Sat Dec 10 20:14:30 UTC 2011
Package: debconf
Version: 1.5.40ubuntu1
Severity: normal
This is related to bug reports #630772 and #637737
When purging old kernels from the command line, multiple "Use of uninitialized value $command" errors are displayed. These errors are caused by the following code line:
return 1 unless defined && ! /^\s*#/; # Skip blank lines, comments.
The code skips undefined input and comments, but the associated inline comment claims that the intent was to skip blank lines and comments. I resolved the problem locally by making the following change:
diff --git a/Debconf/ConfModule.pm b/Debconf/ConfModule.pm
index 8017202..20c084e 100644
--- a/Debconf/ConfModule.pm
+++ b/Debconf/ConfModule.pm
@@ -228,7 +228,9 @@ sub process_command {
my $this=shift;
debug developer => "<-- $_";
- return 1 unless defined && ! /^\s*#/; # Skip blank lines, comments.
+ return 1 unless defined; # Skip empty input.
+ return 1 if /^\s*$/ # Skip blank lines.
+ return 1 if /^\s*#/ # Skip comments.
chomp;
my ($command, @params);
if (defined $this->client_capb and grep { $_ eq 'escape' } @{$this->client_capb}) {
-- System Information:
Debian Release: wheezy/sid
APT prefers oneiric-updates
APT policy: (500, 'oneiric-updates'), (500, 'oneiric'), (100, 'oneiric-backports')
Architecture: i386 (i686)
Kernel: Linux 3.2.0-rc5+ (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages debconf depends on:
ii perl-base 5.12.4-4 minimal Perl system
Versions of packages debconf recommends:
ii apt-utils 0.8.16~exp5ubuntu13 APT utility programs
ii debconf-i18n 1.5.40ubuntu1 full internationalization support
Versions of packages debconf suggests:
pn debconf-doc <none> (no description available)
ii debconf-utils 1.5.40ubuntu1 debconf utilities
ii dialog 1.1-20110707-1 Displays user-friendly dialog boxe
ii libgtk2-perl 2:1.223-1build2 Perl interface to the 2.x series o
pn libnet-ldap-perl <none> (no description available)
pn libqtcore4-perl <none> (no description available)
pn libqtgui4-perl <none> (no description available)
pn libterm-readline-gnu-pe <none> (no description available)
ii perl 5.12.4-4 Larry Wall's Practical Extraction
ii whiptail 0.52.11-2ubuntu8 Displays user-friendly dialog boxe
-- debconf information:
debconf-apt-progress/title:
debconf-apt-progress/info:
debconf/priority: high
debconf-apt-progress/preparing:
debconf-apt-progress/media-change:
* debconf/frontend: Dialog
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debconf-process_command.diff
Type: text/x-diff
Size: 558 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debconf-devel/attachments/20111210/efa04dd2/attachment.diff>
More information about the Debconf-devel
mailing list