[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#491302: lintian: exclude Format-Specification from the copyright-line-too-long check



Package: lintian
Version: 1.24.2
Severity: normal
Tags: patch

The machine-readable copyright format includes a Format-Specification
header line that, for the present, usually points at the Wiki page for
the proposal.  However, most people (including me) reference a specific
version of the Wiki proposal page by using a URL like:
http://wiki.debian.org/Proposals/CopyrightFormat?recall=184

This, combined with the "Format-Specification: " in front, is virtually
guaranteed to make lintian warn about a "copyright line too long" :)

Attached is a patch that matches the lines read from the copyright file
against the "Format-Specification: proposal-url" pattern and excludes
any lines that start like this.

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.18-4-686 (SMP w/1 CPU core)
Locale: LANG=bg_BG.CP1251, LC_CTYPE=bg_BG.CP1251 (charmap=CP1251)
Shell: /bin/sh linked to /bin/bash

Versions of packages lintian depends on:
ii  binutils            2.18.1~cvs20080103-7 The GNU assembler, linker and bina
ii  diffstat            1.45-2               produces graph of changes introduc
ii  dpkg-dev            1.14.20              Debian package development tools
ii  file                4.24-4               Determines file type using "magic"
ii  gettext             0.17-3               GNU Internationalization utilities
ii  intltool-debian     0.35.0+20060710.1    Help i18n of RFC822 compliant conf
ii  libdigest-sha-perl  5.47-1               Perl extension for SHA-1/224/256/3
ii  libparse-debianchan 1.1.1-2              parse Debian changelogs and output
ii  libtimedate-perl    1.1600-9             Time and date functions for Perl
ii  liburi-perl         1.35.dfsg.1-1        Manipulates and accesses URI strin
ii  man-db              2.5.2-1              on-line manual pager
ii  perl [libdigest-sha 5.10.0-11            Larry Wall's Practical Extraction 

lintian recommends no packages.

-- no debconf information
Index: checks/copyright-file
===================================================================
--- checks/copyright-file	(revision 2491)
+++ checks/copyright-file	(revision 2492)
@@ -155,7 +155,8 @@
 # matter for the length check.
 my @lines = split ("\n", decode ('utf-8', $_));
 for my $i (0 .. $#lines) {
-    if (length ($lines[$i]) > 80) {
+    if (length ($lines[$i]) > 80 &&
+	$lines[$i] !~ m{^Format-Specification:\s*http://wiki.debian.org/Proposals/CopyrightFormat}) {
 	tag "debian-copyright-line-too-long", "line " . ($i+1);
     }
 }
Index: testset/copyright/debian/copyright.no-errors
===================================================================
--- testset/copyright/debian/copyright.no-errors	(revision 2491)
+++ testset/copyright/debian/copyright.no-errors	(revision 2492)
@@ -3,6 +3,8 @@
 
 It was downloaded from <http://www.example.org/>
 
+Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?recall=184
+
 Upstream Authors: 
 
     Tobias Toedter <t.toedter@gmx.net>

Attachment: pgpvmtHJf4KIe.pgp
Description: PGP signature


Reply to: