Branch Coverage

blib/lib/MDV/Distribconf.pm
Criterion Covered Total %
branch 113 148 76.3


line true false branch
196 47 3 unless (defined $mediacfg_version)
219 1 44 unless $distrib->loadtree
220 0 44 unless $distrib->parse_mediacfg or $distrib->parse_hdlists
235 30 15 if (-d "$distrib->{'root'}/media/media_info") { }
14 1 elsif (-d "$distrib->{'root'}/Mandrake/base") { }
263 0 22 if mymediacfg_version() < $wanted_version
265 0 22 if $wanted_version < $distrib->getvalue(undef, 'mediacfg_version')
285 1 3 if (ref $spec eq 'HASH') { }
1 2 elsif ($spec and $spec =~ /mandrake/i) { }
316 0 23 unless open my $h_hdlists, '<', $hdlists
323 0 56 unless length $_
326 3 53 unless ($media{'hdlist'})
329 0 56 if ($options)
334 0 56 $options ? :
335 0 168 unless $distrib->{'cfg'}->newval($media{'path'}, $_, $media{$_})
356 0 0 unless open my $h_ver, '<', $fversion
383 0 22 unless -f $mediacfg and -r _ and $distrib->{'cfg'} = 'Config::IniFiles'->new('-file', $mediacfg, '-default', 'media_info', '-allowcontinue', 1)
414 246 1009 unless $value
416 960 49 if $self->getvalue(undef, 'mediacfg_version') < 3
419 0 49 if ++$level >= 15
422 1 2 unless $self->getvalue($media, $1)
425 0 2 unless $self->getvalue('media_info', $1, $level)
448 0 3721 unless $distrib->mediaexists($media)
452 192 3529 if /^path$/
453 245 3284 if /^root$/
454 3 3281 if /^(info|files|changelog)$/
456 2 3279 if (/^synthesis$/)
459 0 2 if ($default =~ /.*\.cz$/ and not $distrib->getvalue(undef, 'synthesis-suffix') eq '.cz')
464 184 3097 if /^synthesis-filter$/
465 184 3097 if /^synthesis-suffix$/
466 549 2548 if /^xml-info-filter$/
467 549 2548 if /^xml-info-suffix$/
468 49 2499 if /^hdlist$/
469 4 2544 if /^pubkey$/
470 55 2493 if (/^(pubkey|hdlist|synthesis)$/)
473 66 2482 if (/^name$/)
478 0 2482 if (/^productid$/)
483 1297 1185 if /^mediacfg_version$/
484 4 1181 if (/^VERSION$/)
485 0 1181 if (/^product.id$/)
486 0 1181 if (/^product$/)
488 0 1181 if (/^(MD5SUM|depslist.ordered|compss|provides)$/)
489 0 1181 if (/^(?:tag|branch)$/)
490 8 1173 if (/^(?:media|info)dir$/)
491 19 1154 if (/^os$/)
492 19 1135 if (/^gnu$/)
493 19 1116 if (/^vendor$/)
494 57 1059 if (/^arch$/)
495 19 1040 if (/^platform$/)
497 19 0 $distrib->getvalue($media, 'gnu') ? :
19 0 defined $arch ? :
505 0 1040 if (/^rpmsrate$/)
506 4 1036 if (/^description$/)
507 0 1036 if (/^provide$/)
508 0 1036 if (/^depslist.ordered$/)
523 0 523 unless $distrib->mediaexists($media)
525 3 520 if ($var =~ /^(info|files|changelog)$/)
526 0 3 unless $distrib->getvalue($media, 'xml-info')
527 0 3 unless $distrib->getvalue($media, 'cdmode')
530 257 266 if $var =~ /^(?:root|VERSION|product\.id|(?:media|info)dir)$/
531 192 74 $var eq 'path' ? :
532 135 131 if ($distrib->getvalue(undef, 'mediacfg_version') >= 2) { }
537 59 59 $var eq 'path' ? :
13 118 $val =~ m[/] ? :
560 0 182 if $var eq 'path'
561 3 179 if ($var =~ /^(info|files|changelog)$/)
562 0 3 unless $distrib->getvalue($media, 'xml-info')
563 0 3 if $distrib->getvalue($media, 'cdmode')
579 0 22 unless my $path = $distrib->getpath(@_)
580 0 22 if ($_[1] || '') eq 'root'
593 0 10 unless my $path = $distrib->getmediapath(@_)
609 205 16 if ($var =~ /^(hdlist|synthesis|pubkey|MD5SUM|info|files|changelog)$/) { }
610 38 167 if ($distrib->getvalue($media, 'cdmode') or $distrib->{'type'} eq 'mandrake') { }
632 0 197 unless my $path = $distrib->getdpath(@_)