process_command does not properly skip blank input lines
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
debconf (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Upstream bug report filed at http://
This is related to Debian 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/
index 8017202..20c084e 100644
--- a/Debconf/
+++ b/Debconf/
@@ -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-
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: debconf 1.5.40ubuntu1 [modified: usr/share/
Uname: Linux 3.2.0-rc5+ i686
ApportVersion: 1.23-0ubuntu4
Architecture: i386
Date: Sat Dec 10 15:18:59 2011
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha i386 (20100712)
ProcEnviron:
LANGUAGE=
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: debconf
UpgradeStatus: No upgrade log present (probably fresh install)
The attachment "debconf- process_ command. diff" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.
[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]