[SCM] Debian package checker branch, master, updated. 1.24.4-57-gcfdcbc8
The following commit has been merged in the master branch:
commit a36605eeff8b300666114f193fb2692a19a442b1
Author: Jordà Polo <jorda@ettin.org>
Date: Sun Aug 17 23:48:51 2008 +0200
Display Severity/Certainty on maintainer reports
diff --git a/lib/Read_taginfo.pm b/lib/Read_taginfo.pm
index 5714bf0..dbcd464 100644
--- a/lib/Read_taginfo.pm
+++ b/lib/Read_taginfo.pm
@@ -63,8 +63,8 @@ sub read_tag_info {
if ($secs[$i]->{'severity'} and $secs[$i]->{'certainty'}) {
push(@foo, "");
- push(@foo, "Severity: $secs[$i]->{'severity'};");
- push(@foo, "Certainty: $secs[$i]->{'certainty'}");
+ push(@foo, "Severity: $secs[$i]->{'severity'}; " .
+ "Certainty: $secs[$i]->{'certainty'}");
}
if ($secs[$i]->{'experimental'}) {
diff --git a/reporting/html_reports b/reporting/html_reports
index fcf94a6..f548317 100755
--- a/reporting/html_reports
+++ b/reporting/html_reports
@@ -63,6 +63,26 @@ our (%binary_info, %source_info, %udeb_info, %bin_src_ref);
# Get the tag information from the Lintian *.desc files.
our %tag_info = %{ read_tag_info('html') };
+# Get additional tag information.
+our %tag_extra = ();
+
+opendir(CHECKDIR, "$LINTIAN_ROOT/checks")
+ or fail("cannot read directory $LINTIAN_ROOT/checks");
+
+for my $check (readdir CHECKDIR) {
+ next unless $check =~ /\.desc$/;
+ my @tags = read_dpkg_control("$LINTIAN_ROOT/checks/$check");
+ shift(@tags);
+ foreach my $tag (@tags) {
+ next unless $tag->{severity} and $tag->{certainty};
+ my $name = $tag->{tag};
+ $tag_extra{$name}{severity} = $tag->{severity};
+ $tag_extra{$name}{certainty} = $tag->{certainty};
+ }
+}
+
+closedir(CHECKDIR);
+
# Set the Lintian version, current timestamp, and archive timestamp.
our $LINTIAN_VERSION = `$LINTIAN_ROOT/frontend/lintian --print-version`;
our $timestamp = `date -u --rfc-822`;
@@ -244,12 +264,14 @@ while (<>) {
# hashes to save space (which means we can't later do destructive tricks
# with it).
my $info = {
- code => html_quote ($code),
- package => html_quote ($package),
- type => html_quote ($type),
- tag => html_quote ($tag),
- extra => html_quote ($extra),
- xref => maintainer_url ($maintainer) . "#$source"
+ code => html_quote ($code),
+ package => html_quote ($package),
+ type => html_quote ($type),
+ tag => html_quote ($tag),
+ severity => html_quote ($tag_extra{$tag}{severity}),
+ certainty => html_quote ($tag_extra{$tag}{certainty}),
+ extra => html_quote ($extra),
+ xref => maintainer_url ($maintainer) . "#$source"
};
$by_maint{$maintainer}{$source}{$version} ||= [];
push(@{ $by_maint{$maintainer}{$source}{$version} }, $info);
diff --git a/reporting/templates/maintainer.tmpl b/reporting/templates/maintainer.tmpl
index 18ec72a..d16b3a7 100644
--- a/reporting/templates/maintainer.tmpl
+++ b/reporting/templates/maintainer.tmpl
@@ -78,10 +78,15 @@
$OUT .= qq( <ul class="report">\n);
}
+ my $class = '';
+ if ($info->{severity} and $info->{certainty}) {
+ $class = qq( title="$info->{severity}, $info->{certainty}");
+ }
+
# Display tag name only once.
if ($tag ne $info->{tag} or $new_binary) {
$OUT .= "</ul>\n </li>\n" unless $first or $new_binary;
- $OUT .= " <li>\n";
+ $OUT .= " <li$class>\n";
$OUT .= qq( <span class="type-$info->{code}">);
$OUT .= "$info->{code}</span> ";
$OUT .= qq(<a href="../tags/$info->{tag}.html">);
--
Debian package checker
Reply to: