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

lintian: r91 - in trunk: checks debian testset testset/foo++/debian



Author: djpig
Date: 2004-03-05 14:06:14 +0100 (Fri, 05 Mar 2004)
New Revision: 91

Modified:
   trunk/checks/changelog-file
   trunk/checks/changelog-file.desc
   trunk/debian/changelog
   trunk/testset/foo++/debian/changelog
   trunk/testset/info_tags.foo++
   trunk/testset/tags.foo++
Log:
check encoding of changelog file if it is UTF-8 (Closes: #175318)
based on a patch by Denis Barbier


Modified: trunk/checks/changelog-file
===================================================================
--- trunk/checks/changelog-file	2004-03-05 03:41:20 UTC (rev 90)
+++ trunk/checks/changelog-file	2004-03-05 13:06:14 UTC (rev 91)
@@ -188,6 +188,19 @@
     }
 }
 
+# check that changelog is UTF-8 encoded
+open ICONV, "env LANG=C iconv -f utf8 -t utf8 changelog 2>&1 |"
+    or fail("failure while checking encoding of changelog for $type package $pkg");
+my $line = 1;
+while (<ICONV>) {
+    if (m/iconv: illegal input sequence at position \d+$/) {
+	print "E: $pkg $type: debian-changelog-file-uses-obsolete-national-charset at line $line\n";
+	last;
+    }
+    $line++;
+}
+close ICONV;
+
 # read the changelog itself
 #
 # emacs only looks at the last "local variables:" in a file, and only at

Modified: trunk/checks/changelog-file.desc
===================================================================
--- trunk/checks/changelog-file.desc	2004-03-05 03:41:20 UTC (rev 90)
+++ trunk/checks/changelog-file.desc	2004-03-05 13:06:14 UTC (rev 91)
@@ -89,3 +89,14 @@
  files.  Instead, put something like this in your ~/.emacs:
  .
  (setq debian-changelog-mailing-address "userid@debian.org")
+
+Tag: debian-changelog-file-uses-obsolete-national-charset
+Type: error
+Info: The Debian changelog file must be valid UTF-8, an encoding of
+ the Unicode character set.
+ .
+ There are many ways to convert a changelog from an obsoleted charset
+ like ISO-8859-1; you may for example use "iconv" like:
+ .
+  $ iconv -f ISO-8859-1 -t UTF-8 changelog > changelog.new
+  $ mv changelog.new changelog

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2004-03-05 03:41:20 UTC (rev 90)
+++ trunk/debian/changelog	2004-03-05 13:06:14 UTC (rev 91)
@@ -31,6 +31,9 @@
       copyright-should-refer-to-common-license-file-for-gpl due to
       the GFDL. (Closes: #192278)
       Thanks to Ross Burton for reporting this.
+  * checks/changelog-file:
+    + check encoding of changelog file if it is UTF-8 (Closes: #175318)
+      based on a patch by Denis Barbier
   * checks/debhelper.desc:
     + correct reference to debhelper manpage. It's debhelper(7), not
       debhelper(1). (Closes: #188245)

Modified: trunk/testset/foo++/debian/changelog
===================================================================
--- trunk/testset/foo++/debian/changelog	2004-03-05 03:41:20 UTC (rev 90)
+++ trunk/testset/foo++/debian/changelog	2004-03-05 13:06:14 UTC (rev 91)
@@ -1,3 +1,9 @@
+foo++ (4) unstable; urgency=low
+
+  * This changelog now includes a ISO-8859-1 character: '�+
+ -- Frank Lichtenheld <djpig@debian.org>  Fri,  5 Mar 2004 13:41:39 +0100
+
 foo++ (3) unstable; urgency=low
 
   * Set maintainers + uploaders incorrectly

Modified: trunk/testset/info_tags.foo++
===================================================================
--- trunk/testset/info_tags.foo++	2004-03-05 03:41:20 UTC (rev 90)
+++ trunk/testset/info_tags.foo++	2004-03-05 13:06:14 UTC (rev 91)
@@ -73,3 +73,14 @@
 N:   Refer to Policy Manual, section 12.5 for details.
 N:
 E: foo++: wrong-debian-qa-address-set-as-maintainer Lintian Maintainer <debian-qa@lists.debian.org>
+E: foo++: debian-changelog-file-uses-obsolete-national-charset at line 3
+N:
+N:   The Debian changelog file must be valid UTF-8, an encoding of the
+N:   Unicode character set.
+N:   
+N:   There are many ways to convert a changelog from an obsoleted charset
+N:   like ISO-8859-1; you may for example use "iconv" like:
+N:   
+N:    $ iconv -f ISO-8859-1 -t UTF-8 changelog > changelog.new
+N:    $ mv changelog.new changelog
+N:

Modified: trunk/testset/tags.foo++
===================================================================
--- trunk/testset/tags.foo++	2004-03-05 03:41:20 UTC (rev 90)
+++ trunk/testset/tags.foo++	2004-03-05 13:06:14 UTC (rev 91)
@@ -10,3 +10,4 @@
 E: foo++-helper: wrong-debian-qa-address-set-as-maintainer Lintian Maintainer <debian-qa@lists.debian.org>
 E: foo++: no-copyright-file
 E: foo++: wrong-debian-qa-address-set-as-maintainer Lintian Maintainer <debian-qa@lists.debian.org>
+E: foo++: debian-changelog-file-uses-obsolete-national-charset at line 3



Reply to: