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

[SCM] Debian package checker branch, master, updated. 2.2.5-57-g6bf7673



The following commit has been merged in the master branch:
commit 23fd15e69fb5ab5a4dd34c0435b8a3b2e2834d85
Author: Russ Allbery <rra@debian.org>
Date:   Sat Feb 21 19:08:23 2009 -0800

    Don't warn about uncompressed ChangeLog files
    
    * checks/changelog-file:
      + [RA] Don't warn about uncompressed ChangeLog files in doc.  They may
        be small files and the maintainer may be installing some other
        upstream file as the upstrema changelog.  (Closes: #515601)

diff --git a/checks/changelog-file b/checks/changelog-file
index b31dd43..890d6ab 100644
--- a/checks/changelog-file
+++ b/checks/changelog-file
@@ -78,11 +78,8 @@ for my $file (sort keys %{$info->file_info}) {
     }
 }
 
-# TODO: better check for incorrect case, /../i and /../ without i is used
-# together at random it seems here
-
-# Read package contents...
-foreach (sort keys %{$info->index}) { 
+# Read package contents....  Capitalization errors are dealt with later.
+foreach (sort keys %{$info->index}) {
     next unless length $_;
     # skip packages which have a /usr/share/doc/$pkg -> foo symlink
     if (m,usr/share/doc/$ppkg$, and defined $info->index->{$_}->{link}) {
@@ -105,8 +102,11 @@ foreach (sort keys %{$info->index}) {
 	    }
 	}
 
-	# check if changelog files are compressed with gzip -9
-	next unless $file =~ m/^changelog(\.html)?(\.gz)?$|changelog.debian(\.gz)?$/i;
+	# Check if changelog files are compressed with gzip -9.  It's a bit of
+	# an open question here what we should do with a file named ChangeLog.
+	# If there's also a changelog file, it might be a duplicate, or the
+	# packager may have installed NEWS as changelog intentionally.
+	next unless $file =~ m/^changelog(\.html)?(\.gz)?$|changelog.Debian(\.gz)?$/;
 
 	if (not $file =~ m/\.gz$/) {
 	    tag "changelog-file-not-compressed", "$file";
@@ -131,8 +131,6 @@ foreach (sort keys %{$info->index}) {
 	    $found_text = 1;
 	}
     }
-
-    #  next unless m,^(\S+).*usr/share/doc/$ppkg/([^/\s]+)( -> [^/\s]+)?$,o;
 }
 
 # ignore packages which don't have a /usr/share/doc/$pkg directory, since
diff --git a/debian/changelog b/debian/changelog
index e5ef6d7..6e0fb12 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,10 @@ lintian (2.2.6) UNRELEASED; urgency=low
       Raphael Geissert for the report.  (Closes: #516067)
   * checks/common_data.pm:
     + [RA] Virtual packages now come from data.
+  * checks/changelog-file:
+    + [RA] Don't warn about uncompressed ChangeLog files in doc.  They may
+      be small files and the maintainer may be installing some other
+      upstream file as the upstrema changelog.  (Closes: #515601)
   * checks/control-file:
     + [ADB] Properly exclude packages built from the glibc source package
       from the "hardcoded depends on libc" test.  (Closes: #515831)
diff --git a/t/tests/changelog-file-extra-upstream/debian/debian/docs b/t/tests/changelog-file-extra-upstream/debian/debian/docs
new file mode 100644
index 0000000..56631ab
--- /dev/null
+++ b/t/tests/changelog-file-extra-upstream/debian/debian/docs
@@ -0,0 +1 @@
+ChangeLog
diff --git a/t/tests/changelog-file-extra-upstream/desc b/t/tests/changelog-file-extra-upstream/desc
new file mode 100644
index 0000000..6f5db65
--- /dev/null
+++ b/t/tests/changelog-file-extra-upstream/desc
@@ -0,0 +1,6 @@
+Testname: changelog-file-extra-upstream
+Sequence: 6000
+Type: non-native
+Version: 1.0-1
+Description: Check a package with ChangeLog and changelog.gz
+Test-Against: changelog-file-not-compressed
diff --git a/t/source/unpack-srcpkg-dot-dir/tags b/t/tests/changelog-file-extra-upstream/tags
similarity index 100%
copy from t/source/unpack-srcpkg-dot-dir/tags
copy to t/tests/changelog-file-extra-upstream/tags
diff --git a/t/tests/changelog-file-extra-upstream/upstream/ChangeLog b/t/tests/changelog-file-extra-upstream/upstream/ChangeLog
new file mode 100644
index 0000000..2d85e10
--- /dev/null
+++ b/t/tests/changelog-file-extra-upstream/upstream/ChangeLog
@@ -0,0 +1 @@
+This is some upstream changelog file.

-- 
Debian package checker


Reply to: