line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package urpm::xml_info_pkg; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1667
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
736
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
urpm::xml_info_pkg - XML Package data retrieving related routines for urpmi |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 DESCRIPTION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=over |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=item new($class, $hash, $pkg) |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
Returns a proxy object |
18
|
|
|
|
|
|
|
It enable to get the XML info if available, otherwise redirects to URPM::Package |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=cut |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub new { |
23
|
0
|
|
|
0
|
1
|
|
my ($class, $hash, $pkg) = @_; |
24
|
|
|
|
|
|
|
|
25
|
0
|
0
|
|
|
|
|
$pkg and $hash->{pkg} = $pkg; |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
bless $hash, $class; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=item id($pkg) |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=item group($pkg) |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=item size($pkg) |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=item epoch($pkg) |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=item buildhost($pkg) |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=item packager($pkg) |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=item summary($pkg) |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Only available in synthesis/hdlist |
46
|
|
|
|
|
|
|
=cut |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
0
|
1
|
|
sub id { $_[0]{pkg}->id } |
49
|
0
|
|
|
0
|
1
|
|
sub group { $_[0]{pkg}->group } |
50
|
0
|
|
|
0
|
1
|
|
sub size { $_[0]{pkg}->size } |
51
|
0
|
|
|
0
|
1
|
|
sub epoch { $_[0]{pkg}->epoch } |
52
|
0
|
|
|
0
|
1
|
|
sub buildhost { $_[0]{pkg}->buildhost } |
53
|
0
|
|
|
0
|
1
|
|
sub packager { $_[0]{pkg}->packager } |
54
|
0
|
|
|
0
|
1
|
|
sub summary { $_[0]{pkg}->summary } |
55
|
0
|
|
|
0
|
0
|
|
sub conflicts { $_[0]{pkg}->conflicts } |
56
|
0
|
|
|
0
|
0
|
|
sub obsoletes { $_[0]{pkg}->obsoletes } |
57
|
0
|
|
|
0
|
0
|
|
sub provides { $_[0]{pkg}->provides } |
58
|
0
|
|
|
0
|
0
|
|
sub requires { $_[0]{pkg}->requires } |
59
|
0
|
|
|
0
|
0
|
|
sub suggests { $_[0]{pkg}->recommends_nosense } |
60
|
0
|
|
|
0
|
0
|
|
sub recommends{ $_[0]{pkg}->recommends_nosense } |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=item url($pkg) |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=item license($pkg) |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=item sourcerpm($pkg) |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=item description($pkg) |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=item changelogs($pkg) |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=item files($pkg) |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Can be directly available in xml_info |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=cut |
78
|
|
|
|
|
|
|
|
79
|
0
|
0
|
|
0
|
1
|
|
sub url { exists $_[0]{url} ? $_[0]{url} : $_[0]{pkg}->url } |
80
|
0
|
0
|
|
0
|
1
|
|
sub license { exists $_[0]{license} ? $_[0]{license} : $_[0]{pkg}->license } |
81
|
0
|
0
|
|
0
|
1
|
|
sub sourcerpm { exists $_[0]{sourcerpm} ? $_[0]{sourcerpm} : $_[0]{pkg}->sourcerpm } |
82
|
0
|
0
|
|
0
|
1
|
|
sub description { exists $_[0]{description} ? $_[0]{description} : $_[0]{pkg}->description } |
83
|
|
|
|
|
|
|
|
84
|
0
|
0
|
|
0
|
1
|
|
sub changelogs { exists $_[0]{changelogs} ? @{$_[0]{changelogs}} : $_[0]{pkg}->changelogs } |
|
0
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
|
86
|
0
|
0
|
|
0
|
1
|
|
sub files { exists $_[0]{files} ? split("\n", $_[0]{files}) : $_[0]{pkg}->files } |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
my $fullname_re = qr/^(.*)-([^\-]*)-([^\-]*)\.([^\.\-]*)$/; |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=item name($pkg) |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=item version($pkg) |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=item release($pkg) |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=item arch($pkg) |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=item fullname($pkg) |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=item filename($pkg) |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Available in both {pkg} and {fn} |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=cut |
105
|
|
|
|
|
|
|
|
106
|
0
|
0
|
0
|
0
|
1
|
|
sub name { exists $_[0]{pkg} ? $_[0]{pkg}->name : $_[0]{fn} =~ $fullname_re && $1 } |
107
|
0
|
0
|
0
|
0
|
1
|
|
sub version { exists $_[0]{pkg} ? $_[0]{pkg}->version : $_[0]{fn} =~ $fullname_re && $2 } |
108
|
0
|
0
|
0
|
0
|
1
|
|
sub release { exists $_[0]{pkg} ? $_[0]{pkg}->release : $_[0]{fn} =~ $fullname_re && $3 } |
109
|
0
|
0
|
0
|
0
|
1
|
|
sub arch { exists $_[0]{pkg} ? $_[0]{pkg}->arch : $_[0]{fn} =~ $fullname_re && $4 } |
110
|
|
|
|
|
|
|
|
111
|
0
|
0
|
|
0
|
1
|
|
sub fullname { wantarray() ? $_[0]{pkg}->fullname : $_[0]{fn} } |
112
|
0
|
|
|
0
|
1
|
|
sub filename { $_[0]{fn} . '.rpm' } |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
1; |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=back |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=head1 COPYRIGHT |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
Copyright (C) 2005 MandrakeSoft SA |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
Copyright (C) 2005-2010 Mandriva SA |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
Copyright (C) 2011-2017 Mageia |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=cut |