[SCM] Debian package checker branch, master, updated. 2.5.11-9-g4909aed
The following commit has been merged in the master branch:
commit 4909aedb2ec977937645eed1e67d659b0d3b25a9
Author: Niels Thykier <niels@thykier.net>
Date: Fri Dec 14 23:00:55 2012 +0100
c/cruft: Skip non-free pkgs when checking for json license
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/checks/cruft b/checks/cruft
index c57b09e..1121e16 100644
--- a/checks/cruft
+++ b/checks/cruft
@@ -407,6 +407,8 @@ sub find_cruft {
close F;
}
+ next if $info->is_non_free; # (license issue does not apply to non-free)
+
# test license problem is source file (only text file)
if (-T $basename) {
open my $F, '<', $basename or fail "can't open $name: $!";
diff --git a/checks/files b/checks/files
index 4b6c709..3d5ee97 100644
--- a/checks/files
+++ b/checks/files
@@ -1044,10 +1044,11 @@ foreach my $file ($info->sorted_index) {
}
# ---------------- non-free .swf files
- foreach my $flash (@flash_nonfree) {
- last if ($pkg_section =~ m,^non-free/,);
- if ($file =~ m,/$flash,) {
- tag 'non-free-flash', $file;
+ unless ($info->is_non_free) {
+ foreach my $flash (@flash_nonfree) {
+ if ($file =~ m,/$flash,) {
+ tag 'non-free-flash', $file;
+ }
}
}
diff --git a/debian/changelog b/debian/changelog
index a0f9213..3d334d3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,13 @@
lintian (2.5.12) UNRELEASED; urgency=low
+ * checks/cruft:
+ + [NT] Do not emit the license-problem-json-evil tag for
+ non-free packages.
+
+ * lib/Lintian/Collect.pm:
+ + [NT] Add "is_non_free" method to easily check of a given
+ package appears to be non-free.
+
* reporting/harness:
+ [NT] Add --to-stdout option to emit log information to
stdout as well as the log files.
diff --git a/lib/Lintian/Collect.pm b/lib/Lintian/Collect.pm
index d0d8d6b..f51b167 100644
--- a/lib/Lintian/Collect.pm
+++ b/lib/Lintian/Collect.pm
@@ -224,6 +224,24 @@ sub _get_field {
return $fields;
}
+=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/*")
+
+=cut
+
+# sub is_non_free Needs-Info <>
+
+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->field ('section', 'main') =~ m,^(?:non-free|restricted)/,;
+ return $self->{is_non_free};
+}
+
=back
=head1 AUTHOR
--
Debian package checker
Reply to: