Bug#821902: Incorrect test for nativeness of binary packages
Package: lintian
Version: 2.5.43
Severity: normal
Tags: patch
The binary packages built from linux-signed currently elicit the
debian-changelog-file-missing-or-wrong-name warning, although they do
include a changelog.gz. lintian expects any binary package whose
version contains a '-' to be non-native and therefore have a
changelog.Debian.gz. It should be checking whether the *source*
version contains a '-'.
The following patch fixes this.
Ben.
--- a/lib/Lintian/Collect/Binary.pm
+++ b/lib/Lintian/Collect/Binary.pm
@@ -88,7 +88,7 @@
=item native
Returns true if the binary package is native and false otherwise.
-Nativeness will be judged by its version number.
+Nativeness will be judged by the source version number.
If the version number is absent, this will return false (as
native packages are a lot rarer than non-native ones).
@@ -100,7 +100,13 @@
sub native {
my ($self) = @_;
return $self->{native} if exists $self->{native};
- my $version = $self->field('version');
+ my $version;
+ my $source = $self->field('source');
+ if (defined $source && $source =~ m/\((.*)\)/) {
+ $version = $1;
+ } else {
+ $version = $self->field('version');
+ }
if (defined $version) {
$self->{native} = ($version !~ m/-/);
} else {
--- END ---
-- System Information:
Debian Release: stretch/sid
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.5.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages lintian depends on:
ii binutils 2.26-8
ii bzip2 1.0.6-8
ii diffstat 1.61-1
ii file 1:5.25-2
ii gettext 0.19.7-2
ii hardening-includes 2.8+nmu2
ii intltool-debian 0.35.0+20060710.4
ii libapt-pkg-perl 0.1.29+b5
ii libarchive-zip-perl 1.56-2
ii libclass-accessor-perl 0.34-1
ii libclone-perl 0.38-1+b1
ii libdata-alias-perl 1.20-1+b1
ii libdpkg-perl 1.18.4
ii libemail-valid-perl 1.198-1
ii libfile-basedir-perl 0.07-1
ii libipc-run-perl 0.94-1
ii liblist-moreutils-perl 0.413-1+b1
ii libparse-debianchangelog-perl 1.2.0-8
ii libperl5.22 [libdigest-sha-perl] 5.22.1-9
ii libtext-levenshtein-perl 0.13-1
ii libtimedate-perl 2.3000-2
ii liburi-perl 1.71-1
ii libyaml-libyaml-perl 0.41-6+b1
ii man-db 2.7.5-1
ii patchutils 0.3.4-1
ii perl 5.22.1-9
ii t1utils 1.39-2
ii xz-utils 5.1.1alpha+20120614-2.1
Versions of packages lintian recommends:
ii dpkg 1.18.4
ii libautodie-perl 2.29-2
ii libperlio-gzip-perl 0.19-1+b1
ii perl 5.22.1-9
ii perl-modules-5.22 [libautodie-perl] 5.22.1-9
Versions of packages lintian suggests:
ii binutils-multiarch 2.26-8
ii dpkg-dev 1.18.4
ii libhtml-parser-perl 3.72-1
ii libtext-template-perl 1.46-1
-- debconf-show failed
Reply to: