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

[SCM] Debian package checker branch, master, updated. 2.5.10-65-g61add24



The following commit has been merged in the master branch:
commit 61add2482375deba8581e070dcecafa5b6dfc441
Author: Niels Thykier <niels@thykier.net>
Date:   Sun Jul 22 12:02:21 2012 +0200

    c/infofiles: Use open_gz instead of running zcat
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/checks/infofiles b/checks/infofiles
index 959e45e..42eb7d0 100644
--- a/checks/infofiles
+++ b/checks/infofiles
@@ -24,7 +24,7 @@ use strict;
 use warnings;
 
 use Lintian::Tags qw(tag);
-use Lintian::Util qw(clean_env fail);
+use Lintian::Util qw(fail open_gz);
 
 use File::Basename qw(fileparse);
 
@@ -79,24 +79,16 @@ foreach my $file ($info->sorted_index) {
     # If this is the main info file (no numeric extension). make sure it has
     # appropriate dir entry information.
     if ($fname !~ /-\d+\.gz/ && $file_info =~ /gzip compressed data/) {
-        my $pid = open INFO, '-|';
-        if (not defined $pid) {
-            fail("cannot fork: $!");
-        } elsif ($pid == 0) {
-            my $f = quotemeta($info->unpacked($file));
-            clean_env(1);
-            $ENV{LC_ALL} = 'C';
-            exec "zcat $f 2>&1"
-                or fail("cannot run zcat: $!");
-        }
+        my $fd = open_gz ($info->unpacked ($file));
+        fail "open_gz $file: $!" unless defined $fd;
         local $_;
         my ($section, $start, $end);
-        while (<INFO>) {
+        while (<$fd>) {
             $section = 1 if /^INFO-DIR-SECTION\s+\S/;
             $start   = 1 if /^START-INFO-DIR-ENTRY\b/;
             $end     = 1 if /^END-INFO-DIR-ENTRY\b/;
         }
-        close INFO;
+        close $fd;
         tag 'info-document-missing-dir-section', $file unless $section;
         tag 'info-document-missing-dir-entry', $file unless $start && $end;
     }
diff --git a/debian/changelog b/debian/changelog
index cb23782..f3e9dfe 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -24,6 +24,8 @@ lintian (2.5.11) UNRELEASED; urgency=low
     + [NT] Mention that cme can automate fixing some perl
       related tags.  Thanks to gregor herrmann for the report
       and patch.  (Closes: #680446)
+  * checks/infofiles:
+    + [NT] Use L::Util's gzip decompressor rather than zcat.
   * checks/manpages{,.desc}:
     + [CW,NT] Manually do redirects and chdir rather than
       invoking a shell when calling man and lexgrog.

-- 
Debian package checker


Reply to: