chiark / gitweb /
debugging for thing that crashed
[innduct.git] / debian / patches / u_innreport_misc
1 Bug-fixes for innreport:
2  - Test for the existence of 'img_dir' instead of 'html_dir' in innreport;
3  - Trailing comma after %innfeed_spooled with "Outgoing feeds (innfeed)
4    by Articles";
5  - Column "Total" of "Outgoing feeds (innfeed) by Volume" tries to add
6    two hashes which evaluates to a constant 0;
7  - Gracefully handle undefined hash elements in "NNRP readership statistics
8    (by domain)";
9  - Also added two error messages generated by perl-nocem.
10
11 http://inn.eyrie.org/viewcvs/branches/2.4/scripts/innreport.in?r1=8142&r2=8141&pathrev=8142&view=patch
12 http://inn.eyrie.org/viewcvs/branches/2.4/samples/innreport.conf.in?r1=7945&r2=7944&pathrev=7945&view=patch
13 http://inn.eyrie.org/viewcvs/branches/2.4/scripts/innreport_inn.pm?r1=7945&r2=7944&pathrev=7945&view=patch
14
15 --- 2.4/scripts/innreport.in    2008/10/05 23:47:25     8141
16 +++ 2.4/scripts/innreport.in    2008/10/07 17:08:32     8142
17 @@ -212,7 +212,7 @@
18  $IMG_pth = $ref{'webpath'} if defined $ref{'webpath'};
19  
20  $IMG_dir = $HTML_dir . "/" . $IMG_pth
21 -  if (defined $output{'default'}{'html_dir'} ||
22 +  if (defined $output{'default'}{'img_dir'} ||
23         defined $ref{'w'} || defined $ref{'webpath'})
24        &&
25        (defined $output{'default'}{'html_dir'} ||
26 --- 2.4/samples/innreport.conf.in       2008/08/03 07:30:03     7944
27 +++ 2.4/samples/innreport.conf.in       2008/08/03 07:47:10     7945
28 @@ -1267,7 +1267,7 @@
29                 data {
30                           name    "Spooled";
31                           color   "#AF00FF";
32 -                         value   "%innfeed_spooled,";
33 +                         value   "%innfeed_spooled";
34                  };
35         };
36  };
37 @@ -1347,12 +1347,6 @@
38                         color   "#FFAF00";
39                         value   "%innfeed_rejected_size";
40                 };
41 -               data {
42 -                       name    "Total";
43 -                       color   "#00FF00";
44 -                       value   "%innfeed_accepted_size +
45 -                                 %innfeed_rejected_size";
46 -               };
47         };
48  };
49  
50 @@ -2116,8 +2110,8 @@
51                  name          "Rej";
52                  format_name   "%4s";
53                  format        "%4d";
54 -               value         "$nnrpd_post_rej{$key} +
55 -                               $nnrpd_post_error{$key}";
56 +               value         "($nnrpd_post_rej{$key}||0) +
57 +                               ($nnrpd_post_error{$key}||0)";
58                 total         "total(%nnrpd_post_rej) +
59                                total(%nnrpd_post_error)";
60          };
61 @@ -2179,8 +2173,8 @@
62                  name          "Rej";
63                  format_name   "%4s";
64                  format        "%4d";
65 -                value         "$nnrpd_dom_post_rej{$key} +
66 -                              $nnrpd_dom_post_error{$key}";
67 +                value         "($nnrpd_dom_post_rej{$key}||0) +
68 +                              ($nnrpd_dom_post_error{$key}||0)";
69                  total         "total(%nnrpd_dom_post_rej) +
70                                 total(%nnrpd_dom_post_error)";
71          };
72 --- 2.4/scripts/innreport_inn.pm        2008/08/03 07:30:03     7944
73 +++ 2.4/scripts/innreport_inn.pm        2008/08/03 07:47:10     7945
74 @@ -440,8 +440,8 @@
75      # The exact timers change from various versions of INN, so try to deal
76      # with this in a general fashion.
77      if ($left =~ m/^\S+\s+                         # ME
78 -                  time\ (\d+)\s+                  # time
79 -                   ((?:\S+\ \d+\(\d+\)\s*)+)       # timer values
80 +                  time\s(\d+)\s+                  # time
81 +                   ((?:\S+\s\d+\(\d+\)\s*)+)       # timer values
82                     $/ox) {
83        $innd_time_times += $1;
84        my $timers = $2;
85 @@ -719,8 +719,8 @@
86      # ME time X nnnn X(X) [...]
87      return 1 if $left =~ m/backlogstats/;
88      if ($left =~ m/^\S+\s+                         # ME
89 -                   time\ (\d+)\s+                  # time
90 -                   ((?:\S+\ \d+\(\d+\)\s*)+)       # timer values
91 +                   time\s(\d+)\s+                  # time
92 +                   ((?:\S+\s\d+\(\d+\)\s*)+)       # timer values
93                     $/ox) {
94        $innfeed_time_times += $1;
95        my $timers = $2;
96 @@ -1459,8 +1459,8 @@
97      # The exact timers change from various versions of INN, so try to deal
98      # with this in a general fashion.
99      if ($left =~ m/^\S+\s+                         # ME
100 -                  time\ (\d+)\s+                  # time
101 -                   ((?:\S+\ \d+\(\d+\)\s*)+)       # timer values
102 +                  time\s(\d+)\s+                  # time
103 +                   ((?:\S+\s\d+\(\d+\)\s*)+)       # timer values
104                     $/ox) {
105        $nnrpd_time_times += $1;
106        my $timers = $2;
107 @@ -1683,13 +1683,28 @@
108        $nocem_totalids{$nocem_lastid} += $2;
109        return 1;
110      }
111 -    if ($left =~ /bad signature from (.*)/o) {
112 +    if ($left =~ /Article <[^>]*>: (.*) \(ID [[:xdigit:]]*\) not in keyring/o) {
113 +       $nocem_badsigs{$1}++;
114 +       $nocem_goodsigs{$1} = 0 unless ($nocem_goodsigs{$1});
115 +       $nocem_totalbad++;
116 +       $nocem_lastid = $1;
117 +       return 1;
118 +     }
119 +    if ($left =~ /Article <[^>]*>: bad signature from (.*)/o) {
120        $nocem_badsigs{$1}++;
121        $nocem_goodsigs{$1} = 0 unless ($nocem_goodsigs{$1});
122        $nocem_totalbad++;
123        $nocem_lastid = $1;
124        return 1;
125      }
126 +    if ($left =~ /Article <[^>]*>: malformed signature/o) {
127 +      $nocem_badsigs{'N/A'}++;
128 +      $nocem_goodsigs{'N/A'} = 0 unless ($nocem_goodsigs{'N/A'});
129 +      $nocem_totalbad++;
130 +      $nocem_lastid = 'N/A';
131 +      return 1;
132 +    }
133 +
134      return 1;
135    }
136