lintian: r270 - in trunk: checks debian testset testset/foo++/debian
Author: he
Date: 2004-05-13 16:39:57 +0200 (Thu, 13 May 2004)
New Revision: 270
Modified:
trunk/checks/changelog-file
trunk/checks/changelog-file.desc
trunk/debian/changelog
trunk/testset/foo++/debian/changelog
trunk/testset/tags.foo++
Log:
* checks/changelog-files{,.desc}:
+ [HE] New check latest-debian-changelog-entry-without-new-date, comparing
the dates of the last 2 changelog entries. (Closes: #111215)
Modified: trunk/checks/changelog-file
===================================================================
--- trunk/checks/changelog-file 2004-05-13 14:01:31 UTC (rev 269)
+++ trunk/checks/changelog-file 2004-05-13 14:39:57 UTC (rev 270)
@@ -225,8 +225,16 @@
# pesky to replicate. Demanding a match of $prefix and $suffix ought to
# be enough to avoid false positives.
open IN, "changelog" or fail("cannot find changelog for $type package $pkg");
-my ($prefix, $suffix);
+my ($prefix, $suffix, $first_entry_date, $second_entry_date);
while (<IN>) {
+ if (/^ -- .+> (.+?)$/) {
+ if (!$first_entry_date) {
+ $first_entry_date = $1;
+ } elsif (!$second_entry_date) {
+ $second_entry_date = $1;
+ }
+ }
+
if (/^(.*)Local variables:(.*)$/i) {
$prefix = $1;
$suffix = $2;
@@ -241,6 +249,12 @@
}
close IN;
+chomp($first_entry_date = `/bin/date -d "$first_entry_date" +\%s`);
+chomp($second_entry_date = `/bin/date -d "$second_entry_date" +\%s`);
+
+tag "latest-debian-changelog-entry-without-new-date"
+ unless (($first_entry_date - $second_entry_date) > 0);
+
}
1;
Modified: trunk/checks/changelog-file.desc
===================================================================
--- trunk/checks/changelog-file.desc 2004-05-13 14:01:31 UTC (rev 269)
+++ trunk/checks/changelog-file.desc 2004-05-13 14:39:57 UTC (rev 270)
@@ -105,3 +105,8 @@
.
$ iconv -f ISO-8859-1 -t UTF-8 changelog > changelog.new
$ mv changelog.new changelog
+
+Tag: latest-debian-changelog-entry-without-new-date
+Type: warning
+Info: The latest Debian changelog has either the same or even an older date
+ as the entry before.
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2004-05-13 14:01:31 UTC (rev 269)
+++ trunk/debian/changelog 2004-05-13 14:39:57 UTC (rev 270)
@@ -10,6 +10,9 @@
debian-changelog-file-uses-obsolete-national-charset ->
debian-changelog-file-uses-obsolete-national-encoding
(Closes: #248194)
+ * checks/changelog-files{,.desc}:
+ + [HE] New check latest-debian-changelog-entry-without-new-date, comparing
+ the dates of the last 2 changelog entries. (Closes: #111215)
* checks/control-file{,.desc}:
+ [HE] Introduced new check script. New checks:
- build-info-in-binary-control-file-section, triggered
Modified: trunk/testset/foo++/debian/changelog
===================================================================
--- trunk/testset/foo++/debian/changelog 2004-05-13 14:01:31 UTC (rev 269)
+++ trunk/testset/foo++/debian/changelog 2004-05-13 14:39:57 UTC (rev 270)
@@ -4,7 +4,7 @@
* This should trigger
debian-changelog-file-contains-debmake-default-email-address.
- -- Marc 'HE' Brockschmidt <he@unknown> Wed, 14 Apr 2004 01:35:47 +0200
+ -- Marc 'HE' Brockschmidt <he@unknown> Wed, 14 Apr 2003 01:35:47 +0200
foo++ (4) unstable; urgency=low
Modified: trunk/testset/tags.foo++
===================================================================
--- trunk/testset/tags.foo++ 2004-05-13 14:01:31 UTC (rev 269)
+++ trunk/testset/tags.foo++ 2004-05-13 14:39:57 UTC (rev 270)
@@ -19,3 +19,4 @@
W: foo++: readme-debian-contains-debmake-default-email-address
E: foo++ source: build-info-in-binary-control-file-section Package foo++
E: foo++ source: debian-control-file-uses-obsolete-national-encoding at line 18
+W: foo++: latest-debian-changelog-entry-without-new-date
Reply to: