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

[SCM] Debian package checker branch, master, updated. 1.24.2-71-gd63ca76



The following commit has been merged in the master branch:
commit d63ca76c0aa2574f3ea3be3827eed7c8944f8d3a
Author: Adam D. Barratt <adam@adam-barratt.org.uk>
Date:   Tue Aug 5 00:03:45 2008 +0100

    Convert to using Lintian::Collect->index
    
      * checks/etcfiles:
        + [ADB] Walk Lintian::Collect->index instead of reading the "index" file.

diff --git a/checks/etcfiles b/checks/etcfiles
index bfca2c2..1cdbb33 100644
--- a/checks/etcfiles
+++ b/checks/etcfiles
@@ -27,6 +27,7 @@ sub run {
 
 my $pkg = shift;
 my $type = shift;
+my $info = shift;
 
 my %conffiles;
 
@@ -44,22 +45,9 @@ if (open(IN, '<', $conffiles)) {
 }
 
 # Read package contents...
-open(IN, '<', "index") or fail("cannot open index file index: $!");
-while (<IN>) {
-    chop;
-
-    my ($perm,$owner,$size,$date,$time,$file) = split(' ', $_, 6);
-    my $link;
-
-    $file =~ s,^(\./),,;
-    $file =~ s/ link to .*//;
-
-    if ($perm =~ m/^l/) {
-	($file, $link) = split(' -> ', $file);
-    }
-
-    # skip it unless it is a file in /etc
-    next unless $file =~ m,^etc, and $perm =~ m,^-,;
+foreach my $file (keys %{$info->index}) {
+    my $index_info = $info->index->{$file};
+    next unless $file =~ m,^etc, and $index_info->{type}=~ m/^[-h]/;
 
     # If there is a /etc/foo, it must be a conffile (with a few exceptions).
     if (not exists($conffiles{$file})
@@ -70,7 +58,6 @@ while (<IN>) {
 	tag "file-in-etc-not-marked-as-conffile", "/$file";
     }
 }
-close(IN);
 
 }
 
diff --git a/debian/changelog b/debian/changelog
index ed3e8d0..311890a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -27,6 +27,8 @@ lintian (1.24.3) unstable; urgency=low
   * checks/description:
     + [RA] Don't warn about a synopsis that ends in "etc."  Patch from
       Chris Lamb.  (Closes: #491252)
+  * checks/etcfiles:
+    + [ADB] Walk Lintian::Collect->index instead of reading the "index" file.
   * checks/fields{,.desc}:
     + [RA] Warn about packages that depend exclusively on makedev.
       Thanks, Josh Triplett.  (Closes: #491625)

-- 
Debian package checker


Reply to: