[SCM] Debian package checker branch, master, updated. 2.5.11-29-gce7bbee
The following commit has been merged in the master branch:
commit 4ca31ec4dc1dba8ec4657d6d92a5566f887edc71
Author: Jordà Polo <jorda@ettin.org>
Date: Thu Dec 27 12:43:28 2012 +0100
Fix version labels glitches
Don't include labels for: 1) older versions, and 2) versions that are too
close to each other.
* reporting/html_reports:
+ [JP] Fix version labels glitches.
diff --git a/debian/changelog b/debian/changelog
index b4dbdd3..215d233 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -50,6 +50,7 @@ lintian (2.5.12) UNRELEASED; urgency=low
map source packages to the full report for that source.
Thanks to Joerg "Gannef" Jasper for the suggestion to use
RewriteMap. (Closes: #696960)
+ + [JP] Fix version labels glitches.
* reporting/templates/{packages,maintainer,tag}.tmpl:
+ [NT] Properly handle multiple versions of the same source and
add versioned anchors to them.
diff --git a/reporting/html_reports b/reporting/html_reports
index 33da0d6..9be1bf5 100755
--- a/reporting/html_reports
+++ b/reporting/html_reports
@@ -628,11 +628,23 @@ if ($GRAPHS) {
print { $common } "graph_dir='$GRAPH_DIR'\n";
print { $common } "date_min='$date_min'\n";
print { $common } "date_max='$date_max'\n";
- for my $v (sort keys %versions) {
- print { $common } "set label '$v' at '$versions{$v}',graph 1.04 ",
- "rotate by 90 font ',10'\n";
+ my $last_version = 0;
+ for my $v (sort { $versions{$a} <=> $versions{$b} } keys %versions) {
+ next unless $versions{$v} > $date_min;
+
print { $common } "set arrow from '$versions{$v}',graph 0 to ",
"'$versions{$v}',graph 1 nohead lw 0.4\n";
+
+ # Skip label if previous release is too close; graphs can't display
+ # more than ~32 labels.
+ my $min_spacing = 3600 * 24 * $RANGE_DAYS / 32;
+ if ($versions{$v} - $last_version > $min_spacing) {
+ (my $label = $v) =~ s/\-[\w\d]+$//;
+ print { $common } "set label '$label' at '$versions{$v}',graph ",
+ "1.04 rotate by 90 font ',8'\n"
+ }
+
+ $last_version = $versions{$v};
}
close $common or die "close $commonf: $!\n";
--
Debian package checker
Reply to: