line |
true |
false |
branch |
67
|
2852 |
5586 |
if ($type eq 'source') |
79
|
2155 |
6658 |
if (not $binary and @files == 2) |
83
|
186 |
8627 |
if ($templates_file and $templates_file->is_open_ok) |
90
|
8 |
178 |
if ($@) |
99
|
27 |
655 |
if (exists $template->{'template'} and exists $template->{'_choices'}) |
116
|
165 |
0 |
if ($preinst and $preinst->is_file and $preinst->is_open_ok) |
120
|
25 |
2448 |
if (m[/usr/share/debconf/confmodule] or /(?:Debconf|Debian::DebConf)::Client::ConfModule/) |
129
|
106 |
5480 |
if $ctrl_config and $ctrl_config->is_file |
130
|
145 |
5441 |
if $ctrl_templates and $ctrl_templates->is_file |
136
|
5424 |
56 |
unless $seenconfig or $seentemplates or $usespreinst |
142
|
162 |
0 |
if (defined $info->field('version')) { } |
162
|
17 |
145 |
if ($seenconfig and not $seentemplates and not $usesdbconfig) { } |
|
31 |
130 |
elsif ($seentemplates and not $seenconfig and not $usespreinst and $type ne 'udeb') { } |
171
|
17 |
145 |
if ($seenconfig and not $ctrl_config->is_executable) |
179
|
145 |
17 |
if ($seentemplates) |
188
|
8 |
137 |
if ($@) |
200
|
8 |
539 |
if (not exists $template->{'template'}) { } |
205
|
8 |
531 |
unless ($template->{'template'} =~ m[[A-Za-z0-9.+-](?:/[A-Za-z0-9.+-])]) |
210
|
22 |
525 |
if (not exists $template->{'type'}) { } |
|
8 |
517 |
elsif (not $valid_types{$template->{'type'}}) { } |
|
76 |
441 |
elsif ($template->{'type'} eq 'select') { } |
|
28 |
413 |
elsif ($template->{'type'} eq 'multiselect') { } |
|
120 |
293 |
elsif ($template->{'type'} eq 'boolean') { } |
223
|
8 |
14 |
if defined $template->{'default'} and $template->{'default'} ne 'true' and $template->{'default'} ne 'false' |
226
|
110 |
437 |
if ($template->{'choices'} and not $template->{'choices'} =~ /^\s*$/) |
229
|
44 |
480 |
if ($key =~ /^choices-/) |
230
|
8 |
36 |
if (not $template->{$key} or $template->{$key} =~ /^\s*$/o) |
234
|
22 |
22 |
if (count_choices($template->{$key}) != $nrchoices) |
240
|
22 |
88 |
if ($template->{'choices'} =~ /^\s*(yes\s*,\s*no|no\s*,\s*yes)\s*$/i) |
246
|
8 |
539 |
if ($isselect and not exists $template->{'choices'}) |
250
|
22 |
525 |
if (not exists $template->{'description'}) { } |
|
8 |
517 |
elsif ($template->{'description'} =~ /^\s*(.*?)\s*?\n\s*\1\s*$/) { } |
263
|
296 |
1801 |
if (defined $lang) |
266
|
8 |
2089 |
unless ($template_fields{$mainfield}) |
272
|
525 |
22 |
if ($template->{'template'} and $template->{'type'}) |
275
|
102 |
423 |
if $template->{'type'} eq 'note' or $template->{'type'} eq 'text' |
282
|
525 |
22 |
if (defined $template->{'description'}) { } |
284
|
0 |
525 |
unless (defined $short) |
292
|
533 |
14 |
unless ($short =~ /for internal use/i) |
294
|
111 |
422 |
if ($isprompt) |
295
|
22 |
75 |
if ($short and !($short =~ /:$/) || $short =~ /^(what|who|when|where|which|how)/i) |
303
|
104 |
429 |
if ($isselect) |
304
|
36 |
68 |
if ($short =~ /^(Please|Cho+se|Enter|Select|Specify|Give)/) |
309
|
106 |
427 |
if ($ttype eq 'boolean') |
310
|
36 |
70 |
unless ($short =~ /\?/) |
315
|
22 |
511 |
if (defined $extended and $extended =~ /[^\?]\?(\s+|$)/) |
319
|
30 |
503 |
if ($ttype eq 'note') |
320
|
22 |
8 |
if ($short =~ /[.?;:]$/) |
324
|
22 |
511 |
if (length $short > 75) |
327
|
22 |
0 |
unless $type eq 'udeb' and $ttype eq 'text' |
329
|
511 |
22 |
if (defined $template->{'description'}) |
330
|
22 |
489 |
if ($template->{'description'} =~ /(\A|\s)(I|[Mm]y|[Ww]e|[Oo]ur|[Oo]urs|mine|myself|ourself|me|us)(\Z|\s)/) |
336
|
22 |
489 |
if ($template->{'description'} =~ /[ \'\"]yes[ \'\",;.]/i and $ttype eq 'boolean') |
344
|
174 |
359 |
if ($extended) |
349
|
0 |
0 |
if ($pos == -1) |
352
|
0 |
0 |
if ($pos == -1) { } |
361
|
22 |
152 |
if ($lines > 20) |
376
|
414 |
396 |
if ($path and $path->is_file and $path->is_open_ok) { } |
|
36 |
360 |
elsif ($file eq 'postinst') { } |
|
23 |
337 |
elsif ($file eq 'postrm') { } |
382
|
0 |
414 |
unless ($fl and $fl =~ /^\#!/) |
389
|
2964 |
4469 |
unless /\S/ |
392
|
0 |
77 |
unless $next |
395
|
368 |
4101 |
if (m[(?:\.|source)\s+/usr/share/debconf/confmodule] or /(?:use|require)\s+Debconf::Client::ConfModule/) |
399
|
25 |
4444 |
if (not $obsoleteconfmodule and m[(/usr/share/debconf/confmodule\.sh|
Debian::DebConf::Client::ConfModule)]x) |
409
|
296 |
4173 |
if ($file eq 'config' and /db_input/) |
412
|
20 |
1288 |
if ($file eq 'postinst' and not $db_input and /db_input/ and not $config_calls_db_input) |
417
|
20 |
0 |
unless $type eq 'udeb' |
421
|
99 |
4370 |
if (m[/dev/]) |
424
|
374 |
4095 |
if (/\A \s*(?:db_input|db_text)\s+
[\"\']? (\S+?) [\"\']? \s+ (\S+)\s/msx) |
430
|
346 |
28 |
unless ($priority =~ /^\$\S+$/) |
432
|
36 |
310 |
unless $valid_priorities{$priority} |
438
|
63 |
50 |
if $potential_db_abuse{$template} and not $$potential_makedev{$. - 1} && $priority eq 'low' and $priority =~ /^(low|medium)$/ |
443
|
64 |
4405 |
if (/ \A \s* (?:db_get|db_set(?:title)?) \s+
[\"\']? (\S+?) [\"\']? (?:\s|\Z)/msx) |
450
|
0 |
4469 |
if (/^\s*(?:.*=\s*get|set)\s*\(\s*[\"\'](\S+?)[\"\']/ or /\b(?:metaget|settitle)\s*\(\s*[\"\'](\S+?)[\"\']/) |
454
|
14 |
4455 |
if (/^\s*db_register\s+[\"\']?(\S+?)[\"\']?\s+(\S+)\s/) |
458
|
8 |
4461 |
if (not $isdefault and /db_fset.*isdefault/) |
463
|
121 |
4348 |
if (not $db_purge and /db_purge/) |
468
|
232 |
182 |
if ($file eq 'postinst' or $file eq 'config') |
469
|
35 |
197 |
unless ($usesconfmodule) |
470
|
35 |
0 |
unless $type eq 'udeb' or $file eq 'postinst' and not $seenconfig |
476
|
139 |
275 |
if ($file eq 'postrm') |
480
|
18 |
121 |
unless ($db_purge or $selfrelation->implies($ANY_DEBCONF)) |
487
|
0 |
36 |
unless $type eq 'udeb' or not $seenconfig |
493
|
14 |
9 |
unless $type eq 'udeb' or $selfrelation->implies($ANY_DEBCONF) |
504
|
308 |
231 |
if ($templates_used{$template}) { } |
508
|
14 |
0 |
if ($templates_used{$alias}) |
515
|
208 |
9 |
unless ($used or $pkg eq 'debconf' or $type eq 'udeb') |
516
|
208 |
0 |
unless $template =~ m[^shared/packages-(wordlist|ispell)$] or $template =~ m[/languages$] |
525
|
25 |
137 |
if ($usespreinst) { } |
526
|
25 |
0 |
unless ($info->relation('pre-depends')->implies($ANY_DEBCONF)) |
527
|
25 |
0 |
unless $type eq 'udeb' |
531
|
26 |
111 |
unless ($alldependencies->implies($ANY_DEBCONF) or $usesdbconfig) |
542
|
9 |
153 |
if $pkg eq 'debconf' or $type eq 'udeb' |
546
|
0 |
9 |
unless $path and $path->is_open_ok |
550
|
9 |
18 |
if (m[/usr/share/debconf/confmodule] or /(?:Debconf|Debian::DebConf)::Client::ConfModule/) |
571
|
28 |
654 |
if ($chunk =~ /^\\([, ])$/) { } |
|
240 |
414 |
elsif ($chunk =~ /^,\s+$/) { } |
580
|
146 |
8 |
if $item ne '' |