3 # arguments can be package names: their versions are appended to each line, space separated
20 my $optpod = <<'=back';
24 Only output the history of projects that seem to be BBCs. NOTE DANGER:
25 demanding that 5.13 be among the testing perl versions. Option has a
36 Read the local collection from the logfile from metabase, write one line per distro.
47 use Pod
::Usage
qw(pod2usage);
51 use Time
::HiRes
qw(sleep time);
53 my @opt = $optpod =~ /B<--(\S+)>/g;
61 pod2usage
(0) if $Opt{help
};
63 my $storefile = "metabase-log.txt";
64 chdir "/home/k/sources/CPAN/andk-cpan-tools" or die;
65 open my $fh, $storefile or die;
66 # [2010-10-29T21:05:10Z] [Chris Williams (BINGOS)] [pass] [RIZEN/Chat-Envolve-0.0100.tar.gz] [i386-dragonfly-64int] [perl-v5.10.0] [373b43ee-e3a0-11df-9e2d-9e9e6e8696e0] [2010-10-29T21:05:10Z]
67 my @qr = (qr/\[([^\]]+)\]/) x
8;
72 my($date,$tester,$result,$path,$arch,$perl,$uuid,$ts) = my @f = /@qr/ or next;
73 my $h = $H{$path}{history} ||= [];
74 $H{$path}{intro} ||= ++$line;
75 push @$h, {result => $result, ts => $ts, perl => $perl, tester => $tester};
78 HISTORY: for my $path (sort { $H{$a}{intro} <=> $H{$b}{intro} } keys %H) {
80 for my $rec (@{$H{$path}{history}}) {
81 my $result = $rec->{result};
82 next if $result =~ /^(na|unknown)$/;
89 my $distroreport = "";
90 $distroreport .= sprintf "%s:\n", $path;
95 for my $rec (sort {versioncmp($a->{perl},$b->{perl}) || $b->{result} cmp $a->{result}} @{$H{$path}{history}}) {
96 next if $rec->{result} =~ /^(na|unknown)$/;
97 $distroreport .= sprintf " %-15s
%s %s\n", @$rec{"perl
","result
","tester
"};
98 $seen_fail = 1 if $rec->{result} eq "fail
";
99 $maybe_bbc = 0 if $seen_fail && $rec->{result} eq "pass
";
100 $seen_513 = 1 if $rec->{perl} =~ /5\.13\./;
103 if ($maybe_bbc && $seen_513) {
109 # , join(" ", map {$_->{result}} );
111 printf "(boring distros
: %d)\n", $boring;