[SCM] Debian package checker branch, master, updated. 2.5.12-113-g9874023
The following commit has been merged in the master branch:
commit 98740232dd020b64fdd25f7935b73b46fc856040
Author: Niels Thykier <niels@thykier.net>
Date: Wed May 22 22:30:08 2013 +0200
L::C::Source: Add source specific "is_non_free" method
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/debian/changelog b/debian/changelog
index dc46ffd..12a0040 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -103,6 +103,12 @@ lintian (2.5.13) UNRELEASED; urgency=low
+ [NT] Fix a number of spelling mistakes in the POD.
* lib/Lintian/Collect/{Package,Binary}.pm:
+ [NT] Accept Lintian::Path objects to unpacked and control.
+ * lib/Lintian/Collect/Source.pm:
+ + [NT] Provide a "source" specific is_non_free method that reads
+ the "Section"-field from d/control instead of the .dsc. This
+ fixes false-positives "problematic licenses" for non-free
+ packages. Thanks to Bastien Roucariès for the report.
+ (Closes: #709041)
* lib/Lintian/Path.pm:
+ [NT] Rename link_resolved to link_normalized.
* lib/Lintian/Unpacker.pm:
diff --git a/lib/Lintian/Collect/Source.pm b/lib/Lintian/Collect/Source.pm
index bc709a8..099dd8d 100644
--- a/lib/Lintian/Collect/Source.pm
+++ b/lib/Lintian/Collect/Source.pm
@@ -619,6 +619,23 @@ sub index {
return $self->_fetch_index_data('index', 'index', undef, $file);
}
+=item is_non_free
+
+Returns a truth value if the package appears to be non-free (based on
+the section field; "non-free/*" and "restricted/*")
+
+Needs-Info requirements for using I<is_non_free>: L</source_field ([FIELD[, DEFAULT]])>
+
+=cut
+
+sub is_non_free {
+ my ($self) = @_;
+ return $self->{is_non_free} if exists $self->{is_non_free};
+ $self->{is_non_free} = 0;
+ $self->{is_non_free} = 1
+ if $self->source_field('section', 'main') =~ m,^(?:non-free|restricted|multiverse)/,;
+ return $self->{is_non_free};
+}
=back
--
Debian package checker
Reply to: