[lintian] 01/01: Improve output of epoch-change-without-comment to include the actual version change.
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository lintian.
commit fc6e0a725c0414bccb4cb28e5e5e6e626a4907fd
Author: Chris Lamb <lamby@debian.org>
Date: Thu Dec 7 09:17:52 2017 +0000
Improve output of epoch-change-without-comment to include the actual version change.
---
checks/changelog-file.pm | 7 ++++---
debian/changelog | 2 ++
t/tests/changelog-file-epoch-change-without-comment-new/tags | 2 +-
t/tests/changelog-file-epoch-change-without-comment/tags | 2 +-
4 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/checks/changelog-file.pm b/checks/changelog-file.pm
index cd7b9a7..3abba2d 100644
--- a/checks/changelog-file.pm
+++ b/checks/changelog-file.pm
@@ -344,10 +344,11 @@ sub run {
}
}
- my ($first_epoch) = $first_version =~ /^([^:]+):/;
- my ($second_epoch) = $second_version =~ /^([^:]+):/;
- if ($first_epoch and ($second_epoch // '') ne $first_epoch) {
+ my ($first_epoch) = ($first_version =~ /^([^:]+):/, '(none)');
+ my ($second_epoch) = ($second_version =~ /^([^:]+):/, '(none)');
+ if ($first_epoch and $second_epoch ne $first_epoch) {
tag 'epoch-change-without-comment',
+ "$second_epoch -> $first_epoch"
unless $entries[0]->Changes =~ /\bepoch\b/im;
}
}
diff --git a/debian/changelog b/debian/changelog
index cedc65f..dd4c27e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ lintian (2.5.62) UNRELEASED; urgency=medium
+ [CL] Correct operator precedence in "epoch-change-without-comment"
to prevent a false positive when an epoch is present but is unchanged
between versions.
+ + [CL] Improve output of epoch-change-without-comment to include the
+ actual version change.
* checks/python.desc:
+ [CL] Also match, for example, "python2.7:any" when checking the
"dependency-on-python-version-marked-for-end-of-life" tag, not just
diff --git a/t/tests/changelog-file-epoch-change-without-comment-new/tags b/t/tests/changelog-file-epoch-change-without-comment-new/tags
index 37727db..4d9a9fb 100644
--- a/t/tests/changelog-file-epoch-change-without-comment-new/tags
+++ b/t/tests/changelog-file-epoch-change-without-comment-new/tags
@@ -1 +1 @@
-W: changelog-file-epoch-change-without-comment-new: epoch-change-without-comment
+W: changelog-file-epoch-change-without-comment-new: epoch-change-without-comment (none) -> 1
diff --git a/t/tests/changelog-file-epoch-change-without-comment/tags b/t/tests/changelog-file-epoch-change-without-comment/tags
index 0cfc503..df29187 100644
--- a/t/tests/changelog-file-epoch-change-without-comment/tags
+++ b/t/tests/changelog-file-epoch-change-without-comment/tags
@@ -1 +1 @@
-W: changelog-file-epoch-change-without-comment: epoch-change-without-comment
+W: changelog-file-epoch-change-without-comment: epoch-change-without-comment 1 -> 2
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: