Bug#889991: Debian part of a version number when epoch is bumped
- To: 889991@bugs.debian.org
- Subject: Bug#889991: Debian part of a version number when epoch is bumped
- From: Raphael Hertzog <hertzog@debian.org>
- Date: Tue, 8 May 2018 13:07:13 +0200
- Message-id: <[🔎] 20180508110713.GA1812@home.ouaza.com>
- Reply-to: Raphael Hertzog <hertzog@debian.org>, 889991@bugs.debian.org
- In-reply-to: <1518214072.3024822.1265794976.2913ADAC@webmail.messagingengine.com>
- References: <1517929910.3384629.1261406384.3F1C9D52@webmail.messagingengine.com> <20180207095511.GF22511@home.ouaza.com> <1518000472.476176.1262489312.56DD31B4@webmail.messagingengine.com> <20180207112510.GA26722@home.ouaza.com> <20180207125703.GA30286@nunzio.venus.sol> <23163.1137.740556.412858@chiark.greenend.org.uk> <1518084473.31444.4.camel@debian.org> <20180208105018.GF26830@home.ouaza.com> <1518206338.9731.3.camel@debian.org> <1518214072.3024822.1265794976.2913ADAC@webmail.messagingengine.com> <151820555774.26828.1647873690607770799.reportbug@dagon.hellion.org.uk>
On Fri, 09 Feb 2018 22:07:52 +0000 Chris Lamb <lamby@debian.org> 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 to: