new tickets from slaven
[andk-cpan-tools.git] / bin / count-for-ewilhelm.pl
blobd3e9492083ccf2b2ccab2e38f850fbd23f86d5ed
3 =pod
5 * when EWILHELM wants to know which of these distros have (not) been
6 tested with Module-Build-X.XX then we currently cannot answer the
7 question for a large amount of distros, only for a few because the
8 cpantesters/nntp download takes too long. But at least I could look into
9 reports-sent.db, find the last Module-Build-0.2808_03 there at line
10 328836 and count towards the end, which is at 339601, gives >10000
11 smokes which might correspond to >1500 distros. Then I could take those
12 1500 names and look them up in his list. Intersting it is, but only
13 about my tests and not about strange things that might have happened. So
14 we'd need to compare the ceteris paribus results of all these distros
15 with MB latest stable and the _03 candidate.
18 Reword:
20 This script has downloaded and parsed 56000 recent test reports from
21 the cpan testers nntp server. It found 135 distros that have been
22 tested with both MB 0.2808_03 and 0.2808.
24 Collect the names of modules that we have seen results for both MB
25 versions:
27 perl -nle 'next unless /meta:about\[(.+?)\].*?mod:Module::Build\[(0\.2808(?:|_03))\]/; next if $seen{"$1 $2"}++; ++$cseen{$1}==2 and print $1' bin/count-for-ewilhelm.pl.out | wc
29 I hate this sort of oneliners I can never reuse. The following collects
30 only those results that have unambiguous results:
32 perl -nale 'next unless /meta:about\[(.+?)\].*?mod:Module::Build\[(0\.2808(?:|_03))\]/; $seen{$1}{$2}{$F[0]}++;END{for my $d (sort keys %seen){ next unless keys %{$seen{$d}} >= 2; for my $v (sort keys %{$seen{$d}}){ for my $ok (sort keys %{$seen{$d}{$v}}){ my $a = $c{$d}||=[]; push @$a, sprintf "%-34s %12s %-12s %3d\n", $d, $v, $ok, $seen{$d}{$v}{$ok} }}} for my $d (sort keys %c){if (@{$c{$d}}==2){print @{$c{$d}}}}}' bin/count-for-ewilhelm.pl.out
34 =cut
36 use strict;
37 use warnings;
38 use Getopt::Long;
39 use LWP::Simple;
40 use Time::HiRes qw(sleep);
42 our %Opt;
43 GetOptions(\%Opt,
44 "run-ctgetreports!",
47 mirror "http://scratchcomputing.com/tmp/generated_by.module_build.list", "tmp/generated_by.module_build.list";
48 my %C;
50 open my $fh, "/home/sand/.cpanreporter/reports-sent.db" or die;
51 while (<$fh>) {
52 next if $. < 328836;
53 my($distro) = /^\S+\s+\S+\s+(\S+)/ or next;
54 $C{$distro}=1;
58 open my $fh, "tmp/generated_by.module_build.list" or die;
59 while (<$fh>) {
60 chomp;
61 my($vdistro) = m|.+/([^/\s]+)| or next;
62 $vdistro =~ s/\.( tar\.gz | tgz | zip ) $//x ;
63 printf "%d %s\n", $C{$vdistro}||0, $_;
64 if ($C{$vdistro} && $Opt{'run-ctgetreports'}) {
65 my($distro) = $vdistro =~ /^(\S+)-[\d\.]+$/;
66 my @system =
68 "/home/src/perl/repoperls/installed-perls/perl/pVNtS9N/perl-5.8.0\@32642/bin/perl",
69 "-I",
70 "/home/k/sources/cpan-testers-parsereport/lib",
71 "/home/k/sources/cpan-testers-parsereport/bin/ctgetreports",
72 "-q",
73 "meta:about",
74 "-q",
75 "meta:from",
76 "-q",
77 "mod:Module::Build",
78 $distro,
80 warn "system[@system]";
81 system @system;
82 sleep 0.1;