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

[lintian] 02/02: c/r-html-reports: Install lintian log as a resource



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

nthykier pushed a commit to branch master
in repository lintian.

commit 9ae5e31b818d071a44063dd46569fe35251eb1c9
Author: Niels Thykier <niels@thykier.net>
Date:   Mon Jun 27 20:08:18 2016 +0000

    c/r-html-reports: Install lintian log as a resource
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 commands/reporting-html-reports.pm | 10 +++++++---
 debian/changelog                   |  2 ++
 reporting/templates/index.tmpl     |  2 +-
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/commands/reporting-html-reports.pm b/commands/reporting-html-reports.pm
index 7ec0406..767c086 100644
--- a/commands/reporting-html-reports.pm
+++ b/commands/reporting-html-reports.pm
@@ -425,11 +425,15 @@ sub setup_output_dir {
             'in'  => $lintian_log_file,
             'out' => "$output_dir/lintian.log.gz",
         );
-        copy($lintian_log_file, "$output_dir/lintian.log")
-          or
-          die("cannot copy $lintian_log_file to $output_dir/lintian.log: $!");
+        $RESOURCE_MANAGER->install_resource(
+            'lintian.log',
+            {
+                'install_method' => 'copy',
+                'source_file' => $lintian_log_file,
+            });
         spawn(\%opts, ['gzip', '-9nc'])
           or die("cannot create $output_dir/lintian.log.gz.\n");
+        $RESOURCE_MANAGER->install_resource("$output_dir/lintian.log.gz");
     }
 
     for my $dir (@{$resource_dirs}) {
diff --git a/debian/changelog b/debian/changelog
index 1f59a49..b9adba0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ lintian (2.5.46) UNRELEASED; urgency=medium
     + [NT] Fix typo in named parameter that made the raw lintain.log
       unavailable on lintian.debian.org.  Thanks to Guillem Jover
       for reporting the issue.  (Closes: #828719)
+    + [NT] Install the lintian log file as a resource so it can be
+      handled (e.g. cached) like other resources.
 
   * data/spelling/corrections:
     + [JW] Add more corrections.
diff --git a/reporting/templates/index.tmpl b/reporting/templates/index.tmpl
index 468816d..4d9b7e3 100644
--- a/reporting/templates/index.tmpl
+++ b/reporting/templates/index.tmpl
@@ -44,7 +44,7 @@
           <li><a href="{$path_prefix}packages_4.html">S-Z</a></li>
         </ul>
       </li>
-      <li><a href="{$path_prefix}lintian.log">Raw log</a> (warning: very large) [<a href="{$path_prefix}lintian.log.gz">Gzip'd</a>]</li>
+      <li><a href="{resource_path('lintian.log')}">Raw log</a> (warning: very large) [<a href="{resource_path('lintian.log.gz')}">Gzip'd</a>]</li>
     </ul>
   </div> <!-- index -->
 

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


Reply to: