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

lintian: r202 - in branches/1.23.0: checks debian testset



Author: jeroen
Date: 2004-04-20 02:32:36 +0200 (Tue, 20 Apr 2004)
New Revision: 202

Modified:
   branches/1.23.0/checks/changelog-file
   branches/1.23.0/debian/changelog
   branches/1.23.0/testset/tags.filenames
Log:
  * checks/changelog-file:
    + [JvW] Loosen up checks for -0.x versions, could be either native or
      upstream + Debian revision, so some tests cannot be performed because of
      that uncertainty


Modified: branches/1.23.0/checks/changelog-file
===================================================================
--- branches/1.23.0/checks/changelog-file	2004-04-20 00:05:54 UTC (rev 201)
+++ branches/1.23.0/checks/changelog-file	2004-04-20 00:32:36 UTC (rev 202)
@@ -27,6 +27,7 @@
 my $found_html=0;
 my $found_text=0;
 my $native_pkg;
+my $foreign_pkg;
 my $ppkg = quotemeta($pkg);
 
 my @doc_files;
@@ -78,6 +79,9 @@
     }
 }
 
+# TODO: better check for incorrect case, /../i and /../ without i is used
+# together at random it seems here
+
 # Read package contents...
 open(IN,"index") or fail("cannot open index file index: $!");
 while (<IN>) {
@@ -142,10 +146,12 @@
 open(IN,"fields/version") or fail("cannot open fields/version file for reading: $!");
 chop(my $version = <IN>);
 close(IN);
-# FIXME: should do real native-checking, and then if version number is okay.
-# version number of -0.x for example can be either native or non-native...
-$native_pkg = ($version !~ m/-/);
 
+$native_pkg  = ($version !~ m/-/);
+$foreign_pkg = (!$native_pkg and $version !~ m/-0\./);
+# A version of 1.2.3-0.1 could be either, so in that
+# case, both vars are false
+
 if ($native_pkg) {
     my @foo;
     # native Debian package
@@ -186,7 +192,13 @@
     } elsif (my @foo = grep m/^changelog\.debian(\.gz)?$/i,@doc_files) {
 	print "W: $pkg $type: wrong-name-for-debian-changelog-file usr/share/doc/$pkg/$foo[0]\n";
     } else {
-	print "E: $pkg $type: debian-changelog-file-missing\n";
+	print "E: $pkg $type: debian-changelog-file-missing\n"
+	    if $foreign_pkg;
+	# 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
+	# happening if we have a -0.x version number... So not my priority to
+	# fix --Jeroen
     }
 }
 
@@ -240,3 +252,5 @@
     }
     exit 1;
 }
+
+# vim: ts=8 sw=4

Modified: branches/1.23.0/debian/changelog
===================================================================
--- branches/1.23.0/debian/changelog	2004-04-20 00:05:54 UTC (rev 201)
+++ branches/1.23.0/debian/changelog	2004-04-20 00:32:36 UTC (rev 202)
@@ -13,6 +13,9 @@
     + [HE] Check for the debmake template email address in the changelog
       entries. Patch by Steffen Moeller <moeller@pzr.uni-rostock.de>,
       thanks! (Closes: #199903)
+    + [JvW] Loosen up checks for -0.x versions, could be either native or
+      upstream + Debian revision, so some tests cannot be performed because of
+      that uncertainty
   * checks/common_data:
     + [HE] Change known_obsolete_fields to allow checks/fields to
       report the Bugs field als obsolete.

Modified: branches/1.23.0/testset/tags.filenames
===================================================================
--- branches/1.23.0/testset/tags.filenames	2004-04-20 00:05:54 UTC (rev 201)
+++ branches/1.23.0/testset/tags.filenames	2004-04-20 00:32:36 UTC (rev 202)
@@ -1,7 +1,6 @@
 E: filenames: bad-menu-file-name usr/lib/menu/menu
 E: filenames: binary-without-manpage testxbin
 E: filenames: binary-without-manpage testxbin2
-E: filenames: debian-changelog-file-missing <<<< FALSE POSITIVE
 E: filenames: lengthy-symlink usr/lib/filenames/symlink4wrong ../filenames/symlink2
 E: filenames: lengthy-symlink usr/share/doc/filenames/version.txt.gz ../filenames/doc/version6.txt.gz
 E: filenames: no-copyright-file



Reply to: