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

[lintian] 01/01: Link to the package's short report entry from the "full" version if it isn't empty.



This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository lintian.

commit 4958627fa6ccdf2608e6c0b2e6b89004b1355b1b
Author: Chris Lamb <lamby@debian.org>
Date:   Mon Dec 18 09:25:38 2017 +0000

    Link to the package's short report entry from the "full" version if it isn't empty.
---
 debian/changelog                    | 2 ++
 reporting/templates/maintainer.tmpl | 7 +++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 610c530..2c240bc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,8 @@ lintian (2.5.64) UNRELEASED; urgency=medium
 
   * reporting/templates/maintainer.tmpl:
     + [CL] Don't link full report entries to themselves.  (Closes: #884572)
+    + [CL] Link to the package's short report entry from the "full" version
+      if it isn't empty.
 
  -- Chris Lamb <lamby@debian.org>  Sun, 17 Dec 2017 20:24:47 +0000
 
diff --git a/reporting/templates/maintainer.tmpl b/reporting/templates/maintainer.tmpl
index d3da5b9..7be6b7a 100644
--- a/reporting/templates/maintainer.tmpl
+++ b/reporting/templates/maintainer.tmpl
@@ -78,6 +78,7 @@
         }
         for my $version (sort by_version keys %$data) {
             my @tags = @{$data->{$version}};
+            my @error_tags = grep { $_->{code} eq 'E' or $_->{code} eq 'W' } @tags;
             my $first = 1;
             my $binary = '';
             my $tag = '';
@@ -88,8 +89,8 @@
             my $has_extra = 0;
 
             if ($errors) {
-                @tags = grep { $_->{code} eq 'E' or $_->{code} eq 'W' } @tags;
-                next if not @tags;
+                @tags = @error_tags;
+                next if not @error_tags;
             }
 
             for my $info (@tags) {
@@ -123,6 +124,8 @@
                     $OUT .= qq(    <a href="https://bugs.debian.org/src:$source";>Bugs</a>\n);
                     if ($errors) {
                         $OUT .= qq(    <a href="${path_prefix}full/$id#$anchor">Full report</a>\n);
+                    } else if (@error_tags) {
+                        $OUT .= qq(    <a href="${path_prefix}maintainer/$id#$anchor">Short report</a>\n);
                     }
                     $OUT .= qq[  (${status}, last processed by Lintian/$last_processed_by)];
                     $OUT .= qq(   </p>\n  </div>\n);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: