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

lintian: r451 - in trunk: checks collection debian testset



Author: djpig
Date: 2005-07-23 15:43:47 +0200 (Sat, 23 Jul 2005)
New Revision: 451

Modified:
   trunk/checks/changelog-file
   trunk/checks/changelog-file.desc
   trunk/collection/changelog-file
   trunk/debian/changelog
   trunk/testset/tags.binary
Log:
Add a new tag debian-changelog-file-missing-or-wrong-name
which is issued if we found no Debian changelog but an upstream
changelog since the further checks will treat the
latter file as the Debian changelog and only issuing
debian-changelog-file-missing would be confusing then
(Closes: #285152)


Modified: trunk/checks/changelog-file
===================================================================
--- trunk/checks/changelog-file	2005-07-23 13:20:20 UTC (rev 450)
+++ trunk/checks/changelog-file	2005-07-23 13:43:47 UTC (rev 451)
@@ -171,7 +171,9 @@
     # non-native (foreign :) Debian package
 
     # 1. check for upstream changelog
+    my $found_upstream_text_changelog = 0;
     if (grep m/^changelog(\.html)?(\.gz)?$/,@doc_files) {
+	$found_upstream_text_changelog = 1 unless $1;
 	# everything is fine
     } else {
 	# search for changelogs with wrong file name
@@ -197,8 +199,11 @@
     } elsif (my @foo = grep m/^changelog\.debian(\.gz)?$/i,@doc_files) {
 	tag "wrong-name-for-debian-changelog-file", "usr/share/doc/$pkg/$foo[0]";
     } else {
-	tag "debian-changelog-file-missing", ""
-	    if $foreign_pkg;
+	if ($foreign_pkg && $found_upstream_text_changelog) {
+	    tag "debian-changelog-file-missing-or-wrong-name", "";
+	} elsif ($foreign_pkg) {
+	    tag "debian-changelog-file-missing", "";
+	}
 	# TODO: if uncertain whether foreign or native, either changelog.gz or
 	# changelog.debian.gz should exists though... but no tests catches
 	# this (extremely rare) border case... Keep in mind this is only

Modified: trunk/checks/changelog-file.desc
===================================================================
--- trunk/checks/changelog-file.desc	2005-07-23 13:20:20 UTC (rev 450)
+++ trunk/checks/changelog-file.desc	2005-07-23 13:43:47 UTC (rev 451)
@@ -78,6 +78,18 @@
  /usr/share/doc/<i>pkg</i>/changelog.Debian.gz
 Ref: policy 12.7
 
+Tag: debian-changelog-file-missing-or-wrong-name
+Type: error
+Info: Each Debian package (which provides a /usr/share/doc/<i>pkg</i>
+ directory) has to install a Debian changelog file
+ /usr/share/doc/<i>pkg</i>/changelog.Debian.gz
+ .
+ A common error is to name the Debian changelog like an upstream
+ changelog (/usr/share/doc/<i>pkg</i>/changelog.gz) therefor
+ lintian will apply further checks to such a file if it exists
+ even after issuing this error.
+Ref: policy 12.7
+
 Tag: debian-changelog-file-contains-obsolete-user-emacs-settings
 Type: error
 Info: The add-log-mailing-address variable is no longer honored in

Modified: trunk/collection/changelog-file
===================================================================
--- trunk/collection/changelog-file	2005-07-23 13:20:20 UTC (rev 450)
+++ trunk/collection/changelog-file	2005-07-23 13:43:47 UTC (rev 451)
@@ -36,7 +36,7 @@
 	       "unpacked/usr/share/doc/$pkg/changelog.debian",
 	       "unpacked/usr/share/doc/$pkg/changelog.gz",
 	       "unpacked/usr/share/doc/$pkg/changelog",
-           "unpacked/usr/doc/$pkg/changelog.Debian.gz",
+	       "unpacked/usr/doc/$pkg/changelog.Debian.gz",
 	       "unpacked/usr/doc/$pkg/changelog.Debian",
 	       "unpacked/usr/doc/$pkg/changelog.debian.gz",
 	       "unpacked/usr/doc/$pkg/changelog.debian",

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2005-07-23 13:20:20 UTC (rev 450)
+++ trunk/debian/changelog	2005-07-23 13:43:47 UTC (rev 451)
@@ -8,6 +8,12 @@
   * checks/changelog-file{,.desc}:
     + [FL] Use libparse-debianchangelog-perl to parse the changelog,
       which detects a lot of syntax errors
+    + [FL] Add a new tag debian-changelog-file-missing-or-wrong-name
+      which is issued if we found no Debian changelog but an upstream
+      changelog since the further checks will treat the
+      latter file as the Debian changelog and only issuing
+      debian-changelog-file-missing would be confusing then
+      (Closes: #285152)
   * checks/common_data.pm:
     + [FL] Fix typo (hurd-386 -> hurd-i386) from last release
       that lead to spurious warnings about unknown architectures

Modified: trunk/testset/tags.binary
===================================================================
--- trunk/testset/tags.binary	2005-07-23 13:20:20 UTC (rev 450)
+++ trunk/testset/tags.binary	2005-07-23 13:43:47 UTC (rev 451)
@@ -1,5 +1,5 @@
 E: binary: changelog-file-not-compressed changelog
-E: binary: debian-changelog-file-missing
+E: binary: debian-changelog-file-missing-or-wrong-name
 E: binary: file-directly-in-usr-share usr/share/baz
 E: binary: menu-item-missing-required-tag section /usr/lib/menu/binary:1
 E: binary: menu-item-missing-required-tag section /usr/share/menu/binary:1



Reply to: