tag 560414 patch thanks Attached a patch that implements this. It changes the name of the local variable (template) 'type' which currently shadows the higher level (package) 'type' variable.
Cheers, FJP
--- checks/debconf.orig 2010-01-31 10:02:32.000000000 +0100 +++ checks/debconf 2010-02-09 21:05:15.000000000 +0100 @@ -290,10 +290,10 @@ } else { ($short, $extended) = ('', ''); } - my $type = $template->{type} || ''; + my $ttype = $template->{type} || ''; unless ($short =~ /for internal use/i) { - my $isprompt = grep { $_ eq $type } qw(string password); - my $isselect = grep { $_ eq $type } qw(select multiselect); + my $isprompt = grep { $_ eq $ttype } qw(string password); + my $isselect = grep { $_ eq $ttype } qw(select multiselect); if ($isprompt) { if ($short && ($short !~ m/:$/ || $short =~ m/^(what|who|when|where|which|how)/i)) { tag "malformed-prompt-in-templates", $template->{template}; @@ -304,7 +304,7 @@ tag "using-imperative-form-in-templates", $template->{template}; } } - if ($type eq 'boolean') { + if ($ttype eq 'boolean') { if ($short !~ /\?/) { tag "malformed-question-in-templates", $template->{template}; } @@ -312,19 +312,20 @@ if (defined ($extended) && $extended =~ /[^\?]\?(\s+|$)/) { tag "using-question-in-extended-description-in-templates", $template->{template}; } - if ($type eq 'note') { + if ($ttype eq 'note') { if ($short =~ /[.?;:]$/) { tag "malformed-title-in-templates", $template->{template}; } } if (length ($short) > 75) { - tag "too-long-short-description-in-templates", $template->{template}; + tag "too-long-short-description-in-templates", $template->{template} + unless $type eq 'udeb' && $ttype eq 'text'; } if (defined $template->{description}) { if ($template->{description} =~ /(\A|\s)(I|[Mm]y|[Ww]e|[Oo]ur|[Oo]urs|mine|myself|ourself|me|us)(\Z|\s)/) { tag "using-first-person-in-templates", $template->{template}; } - if ($template->{description} =~ /[ \'\"]yes[ \'\",;.]/i and $type eq 'boolean') { + if ($template->{description} =~ /[ \'\"]yes[ \'\",;.]/i and $ttype eq 'boolean') { tag "making-assumptions-about-interfaces-in-templates", $template->{template}; } }