[lintian] 01/01: L::Collect::Binary: Consider source versions when testing nativeness
This is an automated email from the git hooks/post-receive script.
jwilk pushed a commit to branch master
in repository lintian.
commit 1618e2f5bd18fa8f76a7a9794c11791b4b0f12d3
Author: Jakub Wilk <jwilk@debian.org>
Date: Wed Apr 20 18:24:40 2016 +0200
L::Collect::Binary: Consider source versions when testing nativeness
---
debian/changelog | 3 +++
lib/Lintian/Collect/Binary.pm | 10 ++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 329ea83..7672d45 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -55,6 +55,9 @@ lintian (2.5.44) UNRELEASED; urgency=medium
* lib/Lintian/Check.pm:
+ [JW,NT] Flag a duplicate word as a spelling error. This affects
several tags plus spellintian. (Closes: #800476)
+ * lib/Lintian/Collect/Binary.pm:
+ + [JW] Apply patch from Ben Hutchings to consider source versions when
+ testing nativeness of binary packages. (Closes: #821902)
* lib/Lintian/Relation.pm:
+ [JW,NT] Fix broken implication with "P (<< V)" relations.
(Closes: #819560)
diff --git a/lib/Lintian/Collect/Binary.pm b/lib/Lintian/Collect/Binary.pm
index fe6cc59..93d727e 100644
--- a/lib/Lintian/Collect/Binary.pm
+++ b/lib/Lintian/Collect/Binary.pm
@@ -88,7 +88,7 @@ L<Lintian::Collect::Package> modules are also available.
=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 @@ Needs-Info requirements for using I<native>: L<Same as field|Lintian::Collect/fi
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 {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: