[Bug 902624] Re: process_command does not properly skip blank input lines
Ubuntu Foundation's Bug Bot
902624 at bugs.launchpad.net
Sun Dec 11 00:14:17 UTC 2011
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.]
** Tags added: patch
--
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/902624
Title:
process_command does not properly skip blank input lines
Status in “debconf” package in Ubuntu:
New
Bug description:
Upstream bug report filed at http://bugs.debian.org/cgi-
bin/bugreport.cgi?bug=651642
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/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}) {
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: debconf 1.5.40ubuntu1 [modified: usr/share/perl5/Debconf/ConfModule.pm]
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=en_US.UTF-8
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: debconf
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/debconf/+bug/902624/+subscriptions
More information about the foundations-bugs
mailing list