This is an automated email from the git hooks/post-receive script. broucaries-guest pushed a commit to branch master in repository lintian.
commit ec4dcdf1d3d1f20fbd8e46a969edd274dbcd89d2 Author: Bastien ROUCARIÈS <[email protected]> Date: Fri Jul 31 14:59:08 2015 +0200 Detect non consecutive debian revision Signed-off-by: Bastien ROUCARIÈS <[email protected]> --- checks/changelog-file.desc | 8 ++++++++ checks/changelog-file.pm | 19 +++++++++++++++---- debian/changelog | 4 +++- .../debian/debian/changelog.in | 2 +- t/tests/changelog-file-experimental/desc | 3 ++- t/tests/changelog-file-experimental/tags | 3 +++ 6 files changed, 32 insertions(+), 7 deletions(-) diff --git a/checks/changelog-file.desc b/checks/changelog-file.desc index 06e7009..057c4f2 100644 --- a/checks/changelog-file.desc +++ b/checks/changelog-file.desc @@ -359,6 +359,14 @@ Experimental: yes Info: The last changelog entry implies this version is not for release. Instead it should specify the distribution it is to be uploaded to. +Tag: non-consecutive-debian-revision +Severity: pedantic +Certainty: possible +Experimental: yes +Info: The last changelog entry refer to a debian revision that is not + consecutive to previous changelog entry. Please use consecutive Debian + revision or use UNRELEASED version. + Tag: version-refers-to-distribution Severity: minor Certainty: certain diff --git a/checks/changelog-file.pm b/checks/changelog-file.pm index f25f9c0..1cdd9ea 100644 --- a/checks/changelog-file.pm +++ b/checks/changelog-file.pm @@ -319,10 +319,21 @@ sub run { $first_upstream =~ s/-[^-]+$//; my $second_upstream = $second_version; $second_upstream =~ s/-[^-]+$//; - if ( $first_upstream eq $second_upstream - and $entries[0]->Changes - =~ /^\s*\*\s+new\s+upstream\s+(?:\S+\s+)?release\b/im) { - tag 'possible-new-upstream-release-without-new-version'; + my $first_debian = $first_version; + $first_debian =~ s/^[^-]+-//; + my $second_debian = $second_version; + $second_debian =~ s/^[^-]+-//; + + if ($first_upstream eq $second_upstream) { + if ($entries[0]->Changes + =~ /^\s*\*\s+new\s+upstream\s+(?:\S+\s+)?release\b/im) { + tag 'possible-new-upstream-release-without-new-version'; + } + if ($first_debian =~ /^\d+$/ and $second_debian =~ /^\d+$/) { + unless ($second_debian == $first_debian + 1) { + tag 'non-consecutive-debian-revision'; + } + } } my $first_dist = lc $entries[0]->Distribution; diff --git a/debian/changelog b/debian/changelog index a910343..171fe45 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ lintian (2.5.35) UNRELEASED; urgency=medium that contains the "offending" LFS symbol. These tend to come from gnulib and be LFS compliant. Thanks to Guillem Jover for the report. (Closes: #787853) + * checks/changelog-file.{desc,pm}: + + [BR] Detect non consecutive debian revision. (Closes: #789820) * checks/fields.desc: + [JW] Fix spelling of the word "indicate". * checks/scripts.desc: @@ -18,7 +20,7 @@ lintian (2.5.35) UNRELEASED; urgency=medium + [BR] Detect pascal resource file source. (Closes: #793908). * data/scripts/maintainer-script-bad-command: + [BR] Detect more case of - maintainer-script-should-not-use-adduser-system-without-home. + maintainer-script-should-not-use-adduser-system-without-home. + [BR] Print offending line for maintainer-script-should-not-use-adduser-system-without-home. * data/spelling/corrections*: diff --git a/t/tests/changelog-file-experimental/debian/debian/changelog.in b/t/tests/changelog-file-experimental/debian/debian/changelog.in index be6e0e0..5f894f6 100644 --- a/t/tests/changelog-file-experimental/debian/debian/changelog.in +++ b/t/tests/changelog-file-experimental/debian/debian/changelog.in @@ -5,7 +5,7 @@ -- {$author} {$date} -{$source} (0.1) experimental; urgency=low +{$source} (1.0-1) experimental; urgency=low * First upload to experimental. diff --git a/t/tests/changelog-file-experimental/desc b/t/tests/changelog-file-experimental/desc index a7512bf..b940cad 100644 --- a/t/tests/changelog-file-experimental/desc +++ b/t/tests/changelog-file-experimental/desc @@ -1,7 +1,8 @@ Testname: changelog-file-experimental Sequence: 6000 -Version: 1.0 +Version: 1.0-3 Description: Check experimental to unstable changes Skeleton: pedantic Options: --pedantic -I -E Test-For: experimental-to-unstable-without-comment + non-consecutive-debian-revision diff --git a/t/tests/changelog-file-experimental/tags b/t/tests/changelog-file-experimental/tags index 288e37f..81e96cc 100644 --- a/t/tests/changelog-file-experimental/tags +++ b/t/tests/changelog-file-experimental/tags @@ -1 +1,4 @@ P: changelog-file-experimental: experimental-to-unstable-without-comment +P: changelog-file-experimental: no-upstream-changelog +W: changelog-file-experimental source: native-package-with-dash-version +X: changelog-file-experimental: non-consecutive-debian-revision -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: https://lists.debian.org/[email protected]

