lintian: r710 - in trunk: checks debian testset testset/debconf/debian
Author: rra
Date: 2006-08-19 00:19:42 +0200 (Sat, 19 Aug 2006)
New Revision: 710
Modified:
trunk/checks/debconf
trunk/debian/changelog
trunk/testset/debconf/debian/debconf-test.templates
trunk/testset/tags.debconf
Log:
* checks/debconf:
+ [RA] Diagnose a missing template description only once and avoid
Perl warnings. Thanks, Thomas Huriaux. (Closes: #377654)
Modified: trunk/checks/debconf
===================================================================
--- trunk/checks/debconf 2006-08-18 22:06:29 UTC (rev 709)
+++ trunk/checks/debconf 2006-08-18 22:19:42 UTC (rev 710)
@@ -232,15 +232,20 @@
# Check the description against the best practices in the Developer's
# Reference, but skip all templates where the short description contains
# the string "for internal use".
- $template->{description} =~ m/^([^\n]*)\n(.*)$/s;
- my ($short, $extended) = ($1, $2);
- unless (defined $short) {
- $short = $template->{description};
+ my ($short, $extended);
+ if (defined $template->{description}) {
+ $template->{description} =~ m/^([^\n]*)\n(.*)$/s;
+ ($short, $extended) = ($1, $2);
+ unless (defined $short) {
+ $short = $template->{description};
+ }
+ } else {
+ ($short, $extended) = ('', '');
}
unless ($short =~ /for internal use/i) {
my $isprompt = grep { $_ eq $template->{type} } qw(string select password multiselect);
if ($isprompt) {
- if ($short !~ m/:$/) {
+ if ($short && $short !~ m/:$/) {
tag "malformed-prompt-in-templates", $template->{template};
}
if ($short =~ /^(Please|Cho+se|Enter|Select|Specify|Give)/) {
@@ -263,12 +268,14 @@
if (length ($short) > 75) {
tag "too-long-short-description-in-templates", $template->{template};
}
- if ($template->{description} =~ /(\A|\s)(I|[Mm]y|[Ww]e|[Oo]ur|[Oo]urs|mine|myself|ourself|me|us) /) {
- tag "using-first-person-in-templates", $template->{template};
- }
- if ($template->{description} =~ /[ \'\"]([Yy]es)[ \'\",.]/) {
- tag "making-assumptions-about-interfaces-in-templates", $template->{template};
- }
+ if (defined $template->{description}) {
+ if ($template->{description} =~ /(\A|\s)(I|[Mm]y|[Ww]e|[Oo]ur|[Oo]urs|mine|myself|ourself|me|us) /) {
+ tag "using-first-person-in-templates", $template->{template};
+ }
+ if ($template->{description} =~ /[ \'\"]([Yy]es)[ \'\",.]/) {
+ tag "making-assumptions-about-interfaces-in-templates", $template->{template};
+ }
+ }
# Check whether the extended description is too long.
if ($extended) {
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2006-08-18 22:06:29 UTC (rev 709)
+++ trunk/debian/changelog 2006-08-18 22:19:42 UTC (rev 710)
@@ -7,6 +7,9 @@
+ [RA] Remove deb-created-with-broken-tar; the bug was actually in
dpkg, and the dpkg in stable has been fixed. Thanks Jari Aalto and
Thijs Kinkhorst. (Closes: #375638, #376030)
+ * checks/debconf:
+ + [RA] Diagnose a missing template description only once and avoid
+ Perl warnings. Thanks, Thomas Huriaux. (Closes: #377654)
* checks/debhelper:
+ [RA] Use the standard control file parser rather than a custom
parser that can't handle continuation lines.
Modified: trunk/testset/debconf/debian/debconf-test.templates
===================================================================
--- trunk/testset/debconf/debian/debconf-test.templates 2006-08-18 22:06:29 UTC (rev 709)
+++ trunk/testset/debconf/debian/debconf-test.templates 2006-08-18 22:19:42 UTC (rev 710)
@@ -53,3 +53,6 @@
Description: For internal use only
We are testing that style checks are not applied to templates that are
marked as internal.
+
+Template: debconf/no-description
+Type: string
Modified: trunk/testset/tags.debconf
===================================================================
--- trunk/testset/tags.debconf 2006-08-18 22:06:29 UTC (rev 709)
+++ trunk/testset/tags.debconf 2006-08-18 22:19:42 UTC (rev 710)
@@ -2,6 +2,7 @@
E: debconf source: missing-dh_python-build-dependency python | python-dev | python-all-dev
E: debconf-test: extended-description-is-empty
E: debconf-test: mismatch-translated-choices debconf/testmulti choices-de.utf-8
+E: debconf-test: no-template-description debconf/no-description
E: debconf-test: settitle-requires-versioned-depends config
E: debconf-udeb udeb: udeb-postinst-must-not-call-ldconfig
W: debconf source: invalid-po-file debian/po/fr.po
Reply to: