lintian: r1134 - in trunk: checks debian testset/cdbs-test/debian
Author: rra
Date: 2008-01-22 05:44:33 +0100 (Tue, 22 Jan 2008)
New Revision: 1134
Modified:
trunk/checks/changelog-file
trunk/debian/changelog
trunk/testset/cdbs-test/debian/changelog
Log:
* checks/changelog-file:
+ [RA] Decode the changelog entry from UTF-8 before doing length
checks. Thanks, Cyril Brulebois. (Closes: #461822)
Modified: trunk/checks/changelog-file
===================================================================
--- trunk/checks/changelog-file 2008-01-22 04:24:55 UTC (rev 1133)
+++ trunk/checks/changelog-file 2008-01-22 04:44:33 UTC (rev 1134)
@@ -23,6 +23,8 @@
use Spelling;
use Tags;
use Util;
+
+use Encode qw(decode);
use Parse::DebianChangelog;
sub run {
@@ -316,7 +318,12 @@
while ($changes =~ /(closes\s*(?:bug)?\#?\s?\d{6,})[^\w]/ig) {
tag "possible-missing-colon-in-closes", "$1" if $1;
}
- my @lines = split ('\n', $changes);
+
+ # We have to decode into UTF-8 to get the right length for the length
+ # check. For some reason, use open ':utf8' isn't sufficient. If the
+ # changelog uses a non-UTF-8 encoding, this will mangle it, but it doesn't
+ # matter for the length check.
+ my @lines = split ('\n', decode ('utf-8', $changes));
for my $i (0 .. $#lines) {
if (length ($lines[$i]) > 80 && $lines[$i] !~ /^[\s.o*+-]*\S+$/) {
tag 'debian-changelog-line-too-long', "line " . ($i + 1);
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-01-22 04:24:55 UTC (rev 1133)
+++ trunk/debian/changelog 2008-01-22 04:44:33 UTC (rev 1134)
@@ -1,5 +1,8 @@
lintian (1.23.43) UNRELEASED; urgency=low
+ * checks/changelog-file:
+ + [RA] Decode the changelog entry from UTF-8 before doing length
+ checks. Thanks, Cyril Brulebois. (Closes: #461822)
* checks/common_data.pm:
+ [RA] Add Bugs, Origin, and Breaks to known binary and udeb fields
and Bugs to known source fields, matching current dpkg. Thanks,
Modified: trunk/testset/cdbs-test/debian/changelog
===================================================================
--- trunk/testset/cdbs-test/debian/changelog 2008-01-22 04:24:55 UTC (rev 1133)
+++ trunk/testset/cdbs-test/debian/changelog 2008-01-22 04:44:33 UTC (rev 1134)
@@ -3,7 +3,8 @@
* Backport, but for some reason I go on and on for longer than 80 columns thus making the entry annoying to read.
* this-is-a-really-long-dpatch-name-that-contains-the-entire-bug-report-in-the-file-name.dpatch:
- New.
-
+ * Not really too long: “héh锓héh锓héh锓héh锓héh锓héhé”
+
-- Russ Allbery <rra@debian.org> Wed, 05 Dec 2007 17:23:59 -0800
cdbs-test (1-1) unstable; urgency=low
Reply to: