This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=aa605ebd31e7ecc212ade755068cde74ebde2cb3 commit aa605ebd31e7ecc212ade755068cde74ebde2cb3 Author: Guillem Jover <[email protected]> AuthorDate: Mon Mar 9 09:49:33 2020 +0100 Dpkg::Source::Package::V1: Check version format matching source format We error out on native versions on a non-native source. And warn for now on non-native versions on a native source. --- debian/changelog | 1 + scripts/Dpkg/Source/Package/V1.pm | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/debian/changelog b/debian/changelog index 718e0c5dc..1f17b5991 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,7 @@ dpkg (1.20.1) UNRELEASED; urgency=medium - Dpkg: Add a LICENSE section to the POD. - Dpkg::Source::Package: Add new get_upstream_signing_key() method. - Dpkg::Source::Package: Check missing expected tarball signatures. + - Dpkg::Source::Package::V1: Check version format matching source format. * Build system: - Handle .git being a plain file when getting the dpkg tree version. - Add debian/changelog as a Changes file to the CPAN distribution. diff --git a/scripts/Dpkg/Source/Package/V1.pm b/scripts/Dpkg/Source/Package/V1.pm index 24af1126e..185101714 100644 --- a/scripts/Dpkg/Source/Package/V1.pm +++ b/scripts/Dpkg/Source/Package/V1.pm @@ -347,6 +347,16 @@ sub do_build { } } + my $v = Dpkg::Version->new($self->{fields}->{'Version'}); + if ($sourcestyle =~ m/[kpursKPUR]/) { + error(g_('non-native package version does not contain a revision')) + if $v->is_native(); + } else { + # FIXME: This will become fatal in the near future. + warning(g_('native package version may not have a revision')) + unless $v->is_native(); + } + my ($dirname, $dirbase) = fileparse($dir); if ($dirname ne $basedirname) { warning(g_("source directory '%s' is not <sourcepackage>" . -- Dpkg.Org's dpkg

