line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Gentoo::Probe::PkgOf; |
2
|
|
|
|
|
|
|
our($VERSION)=q{1.0.6}; |
3
|
|
|
|
|
|
|
our(@ISA)=qw(Gentoo::Probe::PkgFiles); |
4
|
3
|
|
|
3
|
|
3791
|
use strict;$|=1; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
104
|
|
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
472
|
use Gentoo::Probe::Cmd; |
|
3
|
|
|
|
|
22
|
|
|
3
|
|
|
|
|
19
|
|
7
|
3
|
|
|
3
|
|
527
|
use Gentoo::Probe::PkgFiles; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
23
|
|
8
|
3
|
|
|
3
|
|
13
|
use Gentoo::Util; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
16
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our %fixed_args = ( |
11
|
|
|
|
|
|
|
installed=>1, |
12
|
|
|
|
|
|
|
uninstalled=>0, |
13
|
|
|
|
|
|
|
versions=>1, |
14
|
|
|
|
|
|
|
builds=>0, |
15
|
|
|
|
|
|
|
); |
16
|
|
|
|
|
|
|
sub veto_args(%){ |
17
|
0
|
|
|
0
|
0
|
|
my ( $self, $args ) = @_; |
18
|
0
|
|
|
|
|
|
for ( sort keys %fixed_args ) { |
19
|
0
|
0
|
|
|
|
|
confess "$_ makes no sense here" if defined $args->{$_}; |
20
|
0
|
|
|
|
|
|
$self->{$_} = $fixed_args{$_}; |
21
|
|
|
|
|
|
|
}; |
22
|
0
|
|
0
|
|
|
|
($self->{xpats}, $self->{pats}) = ( ($self->{pats}||[]), [] ); |
23
|
|
|
|
|
|
|
}; |
24
|
|
|
|
|
|
|
sub accept($$$@) { |
25
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
26
|
0
|
|
|
|
|
|
my $base = join("/",shift,shift); |
27
|
0
|
|
|
|
|
|
my @pats = @{$self->{xpats}}; |
|
0
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
local $\=""; |
29
|
0
|
|
|
|
|
|
for ( @_ ) { |
30
|
0
|
|
|
|
|
|
my $fname = $self->{vdb_dir}.'/'.$base . "-" . $_ . "/CONTENTS"; |
31
|
0
|
|
|
|
|
|
local *FILE; |
32
|
0
|
|
|
|
|
|
my $res = open(FILE,"< $fname"); |
33
|
0
|
0
|
|
|
|
|
return unless defined $res; |
34
|
0
|
|
|
|
|
|
while(){ |
35
|
0
|
|
|
|
|
|
chomp; |
36
|
0
|
0
|
|
|
|
|
next unless ($_) = m/^obj\s+(.+)\s+\S+\s+/; |
37
|
0
|
0
|
|
|
|
|
next unless $self->check_pats($_, @pats); |
38
|
0
|
|
|
|
|
|
$self->output($base.":".$_); |
39
|
|
|
|
|
|
|
}; |
40
|
0
|
|
|
|
|
|
close(FILE); |
41
|
|
|
|
|
|
|
}; |
42
|
|
|
|
|
|
|
}; |
43
|
|
|
|
|
|
|
sub output() { |
44
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
45
|
0
|
0
|
|
|
|
|
return unless grep { length } @_; |
|
0
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
|
local ($,,$\)=(",","\n"); |
47
|
0
|
|
|
|
|
|
print @_; |
48
|
|
|
|
|
|
|
} |