[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.1.2-14-gacd7417



The following commit has been merged in the master branch:
commit acd7417f19f7c23860bb63f17e75bea2bd65f5c8
Author: Jordà Polo <jorda@ettin.org>
Date:   Tue Dec 16 17:43:56 2008 +0100

    Group packages by source version on maintainer reports
    
    * reporting/html_reports:
      + [JP] Group packages by source version instead of binary version.
        (Closes: #507849)
    * reporting/templates/maintainer.tmpl:
      + [JP] Include binary package version in subtitles when it isn't the
        same as the source version.

diff --git a/debian/changelog b/debian/changelog
index fb98e5d..5b34723 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -63,6 +63,10 @@ lintian (2.1.3) UNRELEASED; urgency=low
     + [JP] Add a new "source version" field to binary and udeb info files.
       Bump binary and udeb format version to 3 and 2 respectively.
 
+  * reporting/html_reports:
+    + [JP] Group packages by source version instead of binary version.
+      (Closes: #507849)
+
   * reporting/templates/maintainer.tmpl:
     + [ADB] Print tags affecting udeb packages under a heading for that
       package, rather than merging them in to whichever binary package
@@ -71,6 +75,8 @@ lintian (2.1.3) UNRELEASED; urgency=low
     + [ADB] Separate tags affecting a binary package from those of a source
       package with the same name when the binary is the first package produced
       from the source for which there are issues.
+    + [JP] Include binary package version in subtitles when it isn't the same
+      as the source version.
 
   * unpack/list-{bin,udeb}pkg:
     + [JP] Extract source package version from source field.
diff --git a/reporting/html_reports b/reporting/html_reports
index f3f3f0e..743261c 100755
--- a/reporting/html_reports
+++ b/reporting/html_reports
@@ -219,7 +219,7 @@ while (<>) {
     # to be no source package in the archive.  Determine the maintainer and
     # version.  Work around a missing source package by pulling information
     # from a binary package or udeb of the same name if there is any.
-    my ($source, $version, $maintainer, $uploaders);
+    my ($source, $version, $source_version, $maintainer, $uploaders);
     if ($type eq 'source') {
         $source = $package;
         if (exists $source_info{$source}) {
@@ -245,12 +245,15 @@ while (<>) {
         }
         if ($type eq 'binary') {
             $version = $binary_info{$package}->{version};
+            $source_version = $binary_info{$package}->{'source-version'};
         } elsif ($type eq 'udeb') {
             $version = $udeb_info{$package}->{version};
+            $source_version = $udeb_info{$package}->{'source-version'};
         }
     }
     $maintainer ||= '(unknown)';
     $version ||= 'unknown';
+    $source_version ||= $version;
 
     # Check if we've seen the URL for this maintainer before and, if so, map
     # them to the same person as the previous one.
@@ -270,6 +273,7 @@ while (<>) {
     my $info = {
         code      => html_quote ($code),
         package   => html_quote ($package),
+        version   => html_quote ($version),
         type      => html_quote ($type),
         tag       => html_quote ($tag),
         severity  => html_quote ($tag_extra{$tag}{severity}),
@@ -277,8 +281,8 @@ while (<>) {
         extra     => html_quote ($extra),
         xref      => maintainer_url ($maintainer) . "#$source"
     };
-    $by_maint{$maintainer}{$source}{$version} ||= [];
-    push(@{ $by_maint{$maintainer}{$source}{$version} }, $info);
+    $by_maint{$maintainer}{$source}{$source_version} ||= [];
+    push(@{ $by_maint{$maintainer}{$source}{$source_version} }, $info);
     $by_tag{$tag} ||= [];
     push(@{ $by_tag{$tag} }, $info);
 
@@ -290,8 +294,8 @@ while (<>) {
             my $uploader = map_maintainer ($_);
             next if $uploader eq $maintainer;
             $saw_maintainer{$uploader} = 1;
-            $by_uploader{$uploader}{$source}{$version} ||= [];
-            push(@{ $by_uploader{$uploader}{$source}{$version} }, $info);
+            $by_uploader{$uploader}{$source}{$source_version} ||= [];
+            push(@{ $by_uploader{$uploader}{$source}{$source_version} }, $info);
         }
     }
 }
diff --git a/reporting/templates/maintainer.tmpl b/reporting/templates/maintainer.tmpl
index f7f0353..c0c218f 100644
--- a/reporting/templates/maintainer.tmpl
+++ b/reporting/templates/maintainer.tmpl
@@ -94,9 +94,12 @@
                     $OUT .= qq(  <ul class="report">\n) unless $is_binary;
                 }
 
+                my $bin_version = "";
+                $bin_version = " ($info->{version})" if $info->{version} ne $version;
+
                 if ($new_binary) {
                     $OUT .= "</ul>\n    </li>\n  </ul>\n" unless $first;
-                    $OUT .= qq(  <h3>$info->{package}</h3>\n);
+                    $OUT .= qq(  <h3>$info->{package}$bin_version</h3>\n);
                     $OUT .= qq(  <ul class="report">\n);
                 }
 

-- 
Debian package checker


Reply to: