| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Gentoo::Probe::PkgFiles; |
|
2
|
|
|
|
|
|
|
our($VERSION)=q{1.0.6}; |
|
3
|
|
|
|
|
|
|
our(@ISA)=qw(Gentoo::Probe::Cmd); |
|
4
|
4
|
|
|
4
|
|
3336
|
use strict;$|=1; |
|
|
4
|
|
|
|
|
6
|
|
|
|
4
|
|
|
|
|
142
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
512
|
use Gentoo::Probe::Cmd; |
|
|
4
|
|
|
|
|
23
|
|
|
|
4
|
|
|
|
|
21
|
|
|
7
|
4
|
|
|
4
|
|
20
|
use Gentoo::Util; |
|
|
4
|
|
|
|
|
7
|
|
|
|
4
|
|
|
|
|
34
|
|
|
8
|
4
|
|
|
4
|
|
1687
|
use IO::File; |
|
|
4
|
|
|
|
|
4507
|
|
|
|
4
|
|
|
|
|
2406
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our %fixed_args = ( |
|
12
|
|
|
|
|
|
|
installed=>1, |
|
13
|
|
|
|
|
|
|
uninstalled=>0, |
|
14
|
|
|
|
|
|
|
versions=>1, |
|
15
|
|
|
|
|
|
|
builds=>0, |
|
16
|
|
|
|
|
|
|
); |
|
17
|
|
|
|
|
|
|
sub veto_args(%){ |
|
18
|
0
|
|
|
0
|
0
|
0
|
my ( $self, $args ) = @_; |
|
19
|
0
|
|
|
|
|
0
|
for ( sort keys %fixed_args ) { |
|
20
|
0
|
0
|
|
|
|
0
|
confess "$_ makes no sense here" if defined $args->{$_}; |
|
21
|
0
|
|
|
|
|
0
|
$self->{$_} = $fixed_args{$_}; |
|
22
|
|
|
|
|
|
|
}; |
|
23
|
|
|
|
|
|
|
}; |
|
24
|
|
|
|
|
|
|
sub files_output($$$@){ |
|
25
|
0
|
|
|
0
|
0
|
0
|
return $_[0]->output($_[2]); |
|
26
|
|
|
|
|
|
|
}; |
|
27
|
|
|
|
|
|
|
sub pkg_output($$$@){ |
|
28
|
0
|
|
|
0
|
0
|
0
|
return $_[0]->output($_[1].":".$_[2]); |
|
29
|
|
|
|
|
|
|
}; |
|
30
|
|
|
|
|
|
|
sub new(@){ |
|
31
|
2
|
|
|
2
|
0
|
37
|
my $self = Gentoo::Probe::Cmd::new(@_); |
|
32
|
0
|
0
|
|
|
|
|
if ( $self->verbose() ) { |
|
33
|
0
|
|
|
|
|
|
*do_output=*pkg_output; |
|
34
|
|
|
|
|
|
|
} else { |
|
35
|
0
|
|
|
|
|
|
*do_output=*files_output; |
|
36
|
|
|
|
|
|
|
}; |
|
37
|
0
|
|
|
|
|
|
return $self; |
|
38
|
|
|
|
|
|
|
}; |
|
39
|
|
|
|
|
|
|
sub accept($$$@) { |
|
40
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
41
|
0
|
|
|
|
|
|
my $base = join("/",shift,shift); |
|
42
|
0
|
|
|
|
|
|
local $\=""; |
|
43
|
0
|
|
|
|
|
|
for ( @_ ) { |
|
44
|
0
|
|
|
|
|
|
my $fn = $self->vdb_dir()."/".$base . "-" . $_ . "/CONTENTS"; |
|
45
|
0
|
0
|
|
|
|
|
my $fh = IO::File->new($fn) or die "open:$fn:$!\n"; |
|
46
|
0
|
|
|
|
|
|
while(<$fh>){ |
|
47
|
0
|
|
|
|
|
|
chomp; |
|
48
|
0
|
0
|
|
|
|
|
next unless s/^obj\s+//; |
|
49
|
0
|
0
|
|
|
|
|
next unless s/\s.*//; |
|
50
|
0
|
|
|
|
|
|
$self->do_output($base,$_); |
|
51
|
|
|
|
|
|
|
}; |
|
52
|
0
|
|
|
|
|
|
close($fh); |
|
53
|
|
|
|
|
|
|
}; |
|
54
|
|
|
|
|
|
|
}; |
|
55
|
|
|
|
|
|
|
1; |