On Fri, 09 Feb 2018 22:07:52 +0000 Chris Lamb <[email protected]> wrote:
> Done: 
> https://anonscm.debian.org/git/lintian/lintian.git/commit/?id=1cadac3c48bf361c2894d56f2ef6fdf28bc32e9e

This commit does not really implement what was requested in this bug
report.

The desired logic is this one (untested patch):
--- a/checks/changelog-file.pm
+++ b/checks/changelog-file.pm
@@ -318,15 +318,19 @@ sub run {
             my $second_version = $entries[1]->Version;
             if ($first_version and $second_version) {
                 tag 'latest-debian-changelog-entry-without-new-version'
-                  unless versions_gt(
-                    $first_version =~ s/^([^:]+)://r,
-                    $second_version =~ s/^([^:]+)://r
-                  )
+                  unless versions_gt($first_version, $second_version)
                   or $entries[0]->Changes =~ /backport/i
                   or $entries[0]->Source ne $entries[1]->Source;
                 tag 'latest-debian-changelog-entry-changed-to-native'
                   if $native_pkg and $second_version =~ m/-/;
             }
+            my $first_version_without_epoch = $first_version =~ s/^([^:]+)://r;
+            foreach my $entry (@entries[1..$#entries]) {
+                my $entry_version_without_epoch = $entry->Version =~ 
s/^([^:]+)://r;
+                tag 
'latest-debian-changelog-entry-reuses-a-formerly-existing-version'
+                    unless $first_version_without_epoch ne 
$entry_version_without_epoch
+                    or $entries[0]->Source ne $entry->Source;
+            }
 
             my $first_upstream = $first_version;
             $first_upstream =~ s/-[^-]+$//;

You might want to use true version comparison functions instead of "ne" in the
last version check.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: https://www.freexian.com/services/debian-lts.html
Learn to master Debian: https://debian-handbook.info/get/

Reply via email to