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

[SCM] Debian package checker branch, master, updated. 2.5.6-23-g765d243



The following commit has been merged in the master branch:
commit 765d2433193aae787aaab02b6abd654542e4446d
Author: Niels Thykier <niels@thykier.net>
Date:   Sun Mar 25 11:23:32 2012 +0200

    coll/file-info: Compress output file with gzip
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/collection/file-info b/collection/file-info
index ec86e15..32b82fb 100755
--- a/collection/file-info
+++ b/collection/file-info
@@ -33,7 +33,7 @@ my ($pkg, $type, $dir) = @ARGV;
 my $last = '';
 
 my $helper = realpath("$0-helper");
-my $outfile = "$dir/file-info";
+my $outfile = "$dir/file-info.gz";
 
 if ( -e $outfile ) {
     unlink($outfile) or fail "unlink file-info: $!";
@@ -52,7 +52,7 @@ chdir ("$dir/unpacked")
 my %opts = ( pipe_in => FileHandle->new,
              out => $outfile,
              fail => 'never' );
-spawn(\%opts, ['xargs', '-0r', 'file', '-NF', '', '--print0', '--'], '|', [$helper]);
+spawn(\%opts, ['xargs', '-0r', 'file', '-NF', '', '--print0', '--'], '|', [$helper], '|', ['gzip', '--best', '-c']);
 $opts{pipe_in}->blocking(1);
 
 while (<INDEX>) {
diff --git a/collection/file-info.desc b/collection/file-info.desc
index ac42d69..10a19c7 100644
--- a/collection/file-info.desc
+++ b/collection/file-info.desc
@@ -2,5 +2,5 @@ Collector-Script: file-info
 Author: Richard Braakman <dark@xs4all.nl>
 Info: This script runs the file(1) command over all files of any kind of package.
 Type: binary, udeb, source
-Version: 1
+Version: 2
 Needs-Info: unpacked, index
diff --git a/debian/changelog b/debian/changelog
index a7ff94c..813e1da 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -38,6 +38,8 @@ lintian (2.5.7) UNRELEASED; urgency=low
   * checks/menus{,.desc}:
     + [NT] Remove "manual" lazy load of data file.
 
+  * collection/file-info{,.desc}:
+    + [NT] Compress file-info output and bump version of file-info.
   * collection/objdump-info:
     + [NT] Use "fail" from Util.pm rather than embedding a copy of
       it.
diff --git a/lib/Lintian/Collect/Package.pm b/lib/Lintian/Collect/Package.pm
index 7c2b371..03b2954 100644
--- a/lib/Lintian/Collect/Package.pm
+++ b/lib/Lintian/Collect/Package.pm
@@ -42,8 +42,8 @@ sub file_info {
     my $base_dir = $self->base_dir();
     my %file_info;
     # sub file_info Needs-Info file-info
-    open(my $idx, '<', "$base_dir/file-info")
-        or croak "cannot open $base_dir/file-info: $!";
+    open my $idx, '-|', 'gzip', '-dc', "$base_dir/file-info.gz"
+        or croak "cannot open $base_dir/file-info.gz: $!";
     while (<$idx>) {
         chomp;
 

-- 
Debian package checker


Reply to: