The following commit has been merged in the master branch: commit 7efca3cee17294f8b2a74d04a75300f45575eed2 Author: Michal Čihař <[EMAIL PROTECTED]> Date: Fri Nov 28 22:57:17 2008 +0000
Warn when a non-native package gains a native version. * checks/changelog{,.desc}: + Warn when the version of a package changes to Debian native. Based on a patch by Michal Čihař. (Closes: #504070) diff --git a/checks/changelog-file b/checks/changelog-file index c8c69e1..1779bd6 100644 --- a/checks/changelog-file +++ b/checks/changelog-file @@ -293,6 +293,8 @@ if (@entries) { tag "latest-debian-changelog-entry-without-new-version" unless Dep::versions_gt ($first_version, $second_version) or $entries[0]->Changes =~ /backport/i; + tag "latest-debian-changelog-entry-changed-to-native" + if $native_pkg and $second_version =~ m/-/; } } diff --git a/checks/changelog-file.desc b/checks/changelog-file.desc index cb2a9c4..4e09511 100644 --- a/checks/changelog-file.desc +++ b/checks/changelog-file.desc @@ -184,6 +184,14 @@ Certainty: certain Info: The latest Debian changelog entry has a version number that's either the same or smaller than the version number of the entry before. +Tag: latest-debian-changelog-entry-changed-to-native +Severity: normal +Certainty: possible +Info: The latest package has a Debian native version number, while the + previous version number was not native. This is usually a mistake made by + the maintainer by forgetting to append -1 when uploading a new upstream + version. + Tag: syntax-error-in-debian-changelog Severity: normal Certainty: possible diff --git a/debian/changelog b/debian/changelog index 9b9a0c0..da9a44f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,8 @@ lintian (2.1.1) unstable; urgency=low + * checks/changelog{,.desc}: + + [ADB] Warn when the version of a package changes to Debian native. + Based on a patch by Michal Čihař. (Closes: #504070) * checks/scripts: + [ADB] Enhance the test for command-with-path-in-maintainer-script to better match executions of the command rather than the use of its name diff --git a/t/tests/6000_package-version-became-native.desc b/t/tests/6000_package-version-became-native.desc new file mode 100644 index 0000000..0ad1cba --- /dev/null +++ b/t/tests/6000_package-version-became-native.desc @@ -0,0 +1,5 @@ +Testname: package-version-became-native +Version: 1.0 +Description: Test for packages where the version suddenly becomes native +Test-For: latest-debian-changelog-entry-changed-to-native +References: Debian Bug #504070 diff --git a/t/tests/package-version-became-native/debian/debian/changelog.in b/t/tests/package-version-became-native/debian/debian/changelog.in new file mode 100644 index 0000000..5876a6f --- /dev/null +++ b/t/tests/package-version-became-native/debian/debian/changelog.in @@ -0,0 +1,12 @@ +{$srcpkg} ({$version}) unstable; urgency=low + + * Lintian Test Suite. + * Test: {$testname} + + -- {$author} {$date} + +{$srcpkg} (0.1-2) unstable; urgency=low + + * An earlier non-native version. + + -- {$author} Tue, 1 Jan 2008 22:45:57 +0000 diff --git a/t/tests/package-version-became-native/tags b/t/tests/package-version-became-native/tags new file mode 100644 index 0000000..371e573 --- /dev/null +++ b/t/tests/package-version-became-native/tags @@ -0,0 +1 @@ +W: package-version-became-native: latest-debian-changelog-entry-changed-to-native -- Debian package checker -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]