[SCM] Debian package checker branch, master, updated. 2.1.4-13-gfcfd5f7
The following commit has been merged in the master branch:
commit 3121b0e6433218e1895a77c66a99a66db3cd84a5
Author: Russ Allbery <rra@debian.org>
Date: Sat Jan 10 21:09:27 2009 -0800
Avoid Perl warnings from missing Severity or Certainty
* lib/Tags.pm:
+ [RA] Avoid Perl warnings if Severity or Certainty isn't set for a
tag. (Closes: #507278)
diff --git a/debian/changelog b/debian/changelog
index 71f14ee..3588368 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -41,6 +41,9 @@ lintian (2.1.5) UNRELEASED; urgency=low
* lib/Lintian/Schedule.pm:
+ [RA] Fix Perl warnings triggered by missing fields in the control
file of a binary package.
+ * lib/Tags.pm:
+ + [RA] Avoid Perl warnings if Severity or Certainty isn't set for a
+ tag. (Closes: #507278)
* man/lintian.1:
+ [RA] Document new deb-format check script.
diff --git a/lib/Tags.pm b/lib/Tags.pm
index 51f30c3..5970ba1 100644
--- a/lib/Tags.pm
+++ b/lib/Tags.pm
@@ -292,7 +292,13 @@ sub display_tag {
my $severity = $tag_info->{'severity'};
my $certainty = $tag_info->{'certainty'};
- my $level = $display_level{$severity}{$certainty};
+ my $level;
+ if ($severity and $certainty) {
+ $level = $display_level{$severity}{$certainty};
+ } else {
+ # Shouldn't happen, but avoid Perl warnings anyway.
+ $level = 1;
+ }
$tag_info->{'display'} = $level;
return $level if not keys %display_source;
--
Debian package checker
Reply to: