[SCM] Debian package checker branch, master, updated. 1.24.2-68-g63a93c5
The following commit has been merged in the master branch:
commit 63a93c5333e112674c932d2193c74ef4b6d3cad9
Author: Adam D. Barratt <adam@adam-barratt.org.uk>
Date: Mon Aug 4 21:17:26 2008 +0100
Replace the reading of "index" with walking Lintian::Collect::index
+ [ADB] Use Lintian::Collect for accessing control fields and reading the
list of files in the package.
diff --git a/checks/copyright-file b/checks/copyright-file
index 79e49b7..ce0430a 100644
--- a/checks/copyright-file
+++ b/checks/copyright-file
@@ -45,11 +45,10 @@ use lib "$ENV{'LINTIAN_ROOT'}/checks/";
use common_data;
# Read package contents...
-open(IN, '<', "index") or fail("cannot open index file index: $!");
-while (<IN>) {
- chop;
- if (m,usr/(share/)?doc/$ppkg/copyright(\.\S+)?(\s+\-\>\s+.*)?$,) {
- my ($ext,$link) = ($2,$3);
+foreach (keys %{$info->{index}}) {
+ my $index_info = $info->{index}->{$_};
+ if (m,usr/(share/)?doc/$ppkg/copyright(\.\S+)?$,) {
+ my $ext = $2;
$ext = '' if (! defined $ext);
#an extension other than .gz doesn't count as copyright file
@@ -63,20 +62,20 @@ while (<IN>) {
}
#make sure copyright is not a symlink
- if ($link) {
+ if ($index_info->{link}) {
tag "copyright-file-is-symlink", "";
last;
}
#otherwise, pass
- if (($ext eq '') and not $link) {
+ if (($ext eq '') and not $index_info->{link}) {
# everything is ok.
last;
}
fail("unhandled case: $_");
- } elsif (m,usr/share/doc/$ppkg \-\>\s+(\S+),) {
- my ($link) = ($1);
+ } elsif (m,usr/share/doc/$ppkg$, and $index_info->{link}) {
+ my $link = $index_info->{link};
$found = 1;
$linked = 1;
diff --git a/debian/changelog b/debian/changelog
index b258b06..427070b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,7 +10,8 @@ lintian (1.24.3) unstable; urgency=low
+ [ADB] Drop the "copyright line too long" check. Most of the issues
it flags aren't easily fixable, particularly where the copyright file
is (semi)automatically generated. (Closes: #491302, #491365, #491685)
- + [ADB] Use Lintian::Collect for accessing control fields
+ + [ADB] Use Lintian::Collect for accessing control fields and reading the
+ list of files in the package.
+ [ADB] Don't flag use of version 1 of the GPL, or licenses using phrases
such as "compatible with the GPL" (for example, the W3C Software
License) as missing a reference to common-licenses
--
Debian package checker
Reply to: