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

[SCM] Debian package checker branch, master, updated. 2.5.10-37-gec9d849



The following commit has been merged in the master branch:
commit ec9d849ece0e7876a6f21e4caafaeffd505b57a7
Author: Niels Thykier <niels@thykier.net>
Date:   Fri Jul 13 21:30:38 2012 +0200

    c/manpages: Use open_gz for compressed manpages
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/checks/manpages b/checks/manpages
index daa53e6..1c539ec 100644
--- a/checks/manpages
+++ b/checks/manpages
@@ -24,7 +24,7 @@ use warnings;
 
 use Lintian::Check qw(check_spelling);
 use Lintian::Tags qw(tag);
-use Lintian::Util qw(clean_env fail);
+use Lintian::Util qw(clean_env fail open_gz);
 
 use Text::ParseWords ();
 use File::Basename;
@@ -161,11 +161,15 @@ foreach my $file ($info->sorted_index) {
         }
     } else { # not a symlink
         my $path = $info->unpacked($file);
-        open (MANFILE, '-|', "zcat \Q$path\E 2>/dev/null")
-            or fail("cannot open $file: $!");
-        my @manfile = ();
-        while (<MANFILE>) { push @manfile, $_; }
-        close MANFILE;
+        my $fd;
+        if ($file_info =~ m/gzip compressed/) {
+            $fd = open_gz ($path);
+        } else {
+            open $fd, '<', $path;
+        }
+        $fd or fail "cannot open $file: $!";
+        my @manfile = <$fd>;
+        close $fd;
         # Is it a .so link?
         if ($index_info->size < 256) {
             my ($i, $first) = (0, '');
diff --git a/debian/changelog b/debian/changelog
index 7c0b639..b0f5d50 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -31,6 +31,8 @@ lintian (2.5.11) UNRELEASED; urgency=low
       setting MANROFFSEQ to the empty string when calling man.
     + [CW,NT] Pass -Tutf8 -Z to man to skip an unused part of
       the groff pipeline.
+    + [CW,NT] Use the L::Util gzip decompressor to open gzipped
+      manpages.
   * checks/scripts{,.desc}:
     + [NT] Retire check for dpkg-maintscript-helper in preinst.
   * checks/source-copyright{,.desc}:

-- 
Debian package checker


Reply to: