Package: lintian
Version: 1.20.17
Severity: wishlist
Tags: patch

> Rather than mass filing bugs, can you write a lintian check for it
> instead?

As promised, here is the check:

diff -u -urNad old/copyright-file new/copyright-file
--- old/copyright-file  2002-08-20 23:04:54.000000000 +0200
+++ new/copyright-file  2002-08-20 23:04:41.000000000 +0200
@@ -164,6 +164,11 @@
     print "W: $pkg $type: copyright-does-not-refer-to-common-license-file 
$1\n";
 }
 
+if (m,(under )?(the )?(same )?(terms )?as Perl itself,i &&
+    !(m,usr/share/common-licenses/, || m,usr/share/doc/perl,)) {
+    print "E: $pkg: $type: copyright-file-missing-pointer-to-perl-license\n";
+}
+
 exit 0;
 
 # -----------------------------------
diff -u -urNad old/copyright-file.desc new/copyright-file.desc
--- old/copyright-file.desc     2002-08-20 23:04:54.000000000 +0200
+++ new/copyright-file.desc     2002-08-20 23:04:36.000000000 +0200
@@ -112,3 +112,10 @@
 Ref: policy 13.6
 Info: In the directory name /usr/share/common-licenses, licenses is spelt with 
  an `s', not with as licences with a `c'.
+
+Tag: copyright-file-missing-pointer-to-perl-license
+Type: error
+Ref: policy 13.6
+Info: If your package is released under the same terms as Perl itself,
+ it should either refer to the Artistic and GPL files in the
+ /usr/share/common/licenses directory, or to /usr/share/doc/perl/copyright.


Obviously, this is tuned for Perl modules released under the same
terms as Perl itself.

The check is tested outside of lintian, and appears to work
correctly. I hope it'll work in lintian too.


Reply via email to