line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Shipwright::Script::Maintain; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
853
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
5
|
1
|
|
|
1
|
|
3
|
use Shipwright::Util; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
88
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
5
|
use base qw/App::CLI::Command Shipwright::Base Shipwright::Script/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
169
|
|
8
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors( |
9
|
|
|
|
|
|
|
qw/update_order update_refs graph_deps skip_recommends |
10
|
|
|
|
|
|
|
skip_build_requires skip_requires skip_test_requires for_dists/ |
11
|
|
|
|
|
|
|
); |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
6
|
use Shipwright; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub options { |
16
|
|
|
|
|
|
|
( |
17
|
0
|
|
|
0
|
0
|
|
'graph-deps' => 'graph_deps', |
18
|
|
|
|
|
|
|
'update-order' => 'update_order', |
19
|
|
|
|
|
|
|
'update-refs' => 'update_refs', |
20
|
|
|
|
|
|
|
'skip-recommends' => 'skip_recommends', |
21
|
|
|
|
|
|
|
'skip-requires' => 'skip_requires', |
22
|
|
|
|
|
|
|
'skip-build-requires' => 'skip_build_requires', |
23
|
|
|
|
|
|
|
'skip-test-requires' => 'skip_test_requires', |
24
|
|
|
|
|
|
|
'for-dists=s' => 'for_dists', |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub run { |
29
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
30
|
|
|
|
|
|
|
|
31
|
0
|
|
|
|
|
|
my $shipwright = Shipwright->new( repository => $self->repository, ); |
32
|
|
|
|
|
|
|
|
33
|
0
|
0
|
|
|
|
|
if ( $self->update_order ) { |
34
|
0
|
|
|
|
|
|
$shipwright->backend->update_order( |
35
|
|
|
|
|
|
|
for_dists => [ split /,\s*/, $self->for_dists || '' ], |
36
|
0
|
|
0
|
|
|
|
map { $_ => $self->$_ } |
37
|
|
|
|
|
|
|
qw/skip_requires skip_recommends skip_build_requires |
38
|
|
|
|
|
|
|
skip_test_requires/, |
39
|
|
|
|
|
|
|
); |
40
|
0
|
|
|
|
|
|
$self->log->fatal( 'successfully updated order' ); |
41
|
|
|
|
|
|
|
} |
42
|
0
|
0
|
|
|
|
|
if ($self->graph_deps) { |
43
|
0
|
|
|
|
|
|
my $out = $shipwright->backend->graph_deps( |
44
|
|
|
|
|
|
|
for_dists => [ split /,\s*/, $self->for_dists || '' ], |
45
|
0
|
|
0
|
|
|
|
map { $_ => $self->$_ } |
46
|
|
|
|
|
|
|
qw/skip_requires skip_recommends skip_build_requires/, |
47
|
|
|
|
|
|
|
); |
48
|
0
|
|
|
|
|
|
$self->log->fatal( $out ); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
0
|
0
|
|
|
|
|
if ( $self->update_refs ) { |
52
|
0
|
|
|
|
|
|
$shipwright->backend->update_refs; |
53
|
0
|
|
|
|
|
|
$self->log->fatal( 'successfully updated refs' ); |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
1; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
__END__ |