Bug#889991: Debian part of a version number when epoch is bumped

2018-05-08 Thread Raphael Hertzog
On Tue, 08 May 2018, Chris Lamb wrote:
> Hi Raphael,
> 
> > + tag 'latest-debian-changelog-entry-reuses-a-formerly-existing-version'
> 
> Can you provide a quick description for this new tag? :)

Info: All versions for a source package must be unique, even with a leading
 epoch stripped off. However the version in the latest changelog entry, after
 removal of the epoch, matches a version that existed in the past and that is
 recorded in another changelog entry.
 .
 The Debian archive does not allow multiple files with the same name and
 different content, and the name of the generated files (.dsc, .deb, etc.) do 
not
 embed the epoch. That is why the files generated by the current version of this
 source package would be in conflict with some historical files.
 .
 You should thus pick another version (for example by increasing the Debian
 revision until you no longer have any conflict).

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/



Bug#889991: Debian part of a version number when epoch is bumped

2018-05-08 Thread Chris Lamb
Hi Raphael,

> + tag 'latest-debian-changelog-entry-reuses-a-formerly-existing-version'

Can you provide a quick description for this new tag? :)


Best wishes,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#889991: Debian part of a version number when epoch is bumped

2018-05-08 Thread Raphael Hertzog
On Fri, 09 Feb 2018 22:07:52 + Chris Lamb  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/



Bug#889991: Debian part of a version number when epoch is bumped

2018-02-09 Thread Chris Lamb
Hi Ian,

> > Yes. Please file bugs for this. :)
> > 
> > Note however that such a lintian check should not consider changelog
> > entries indicating another source package name.
> 
> Done: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=889991

Done: 
https://anonscm.debian.org/git/lintian/lintian.git/commit/?id=1cadac3c48bf361c2894d56f2ef6fdf28bc32e9e


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-