The following commit has been merged in the master branch:
commit 8e4a1d29ce9422d4013e02a251a89090269d3d34
Author: Russ Allbery <[email protected]>
Date:   Sun Mar 8 21:07:13 2009 -0700

    Avoid false positives and warnings in gzip check
    
    Only check real files, not symlinks, for whether they're in gzip format,
    and skip files for which we have no file info.  This avoids false
    positives on dangling symlinks.

diff --git a/checks/files b/checks/files
index 59295d7..64fd2e9 100644
--- a/checks/files
+++ b/checks/files
@@ -549,11 +549,6 @@ foreach my $file (sort keys %{$info->index}) {
        tag "bad-permissions-for-ali-file", "$file";
     }
 
-    # ---------------- .gz files
-    if ($file =~ m/\.gz/ && $info->file_info->{$file} !~ m/gzip compressed/) {
-       tag "gz-file-not-gzip", "$file";
-    }
-
     # ---------------- any files
     if ($index_info->{type} !~ m/^d/) {
        unless ($type eq 'udeb'
@@ -758,6 +753,14 @@ foreach my $file (sort keys %{$info->index}) {
            }
        }
 
+       # ---------------- .gz files
+       if ($file =~ m/\.gz/) {
+           my $info = $info->file_info->{$file} || '';
+           if ($info !~ m/gzip compressed/) {
+               tag "gz-file-not-gzip", "$file";
+           }
+       }
+
        # ---------------- general: setuid/setgid files!
        if ($operm & 04000 or $operm & 02000) {
            my ($setuid, $setgid) = ("","");

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to