2 # $Id: mailsummary.in,v 1.11 2003/04/28 23:51:15 cjwatson Exp $
4 $config_path = '/etc/debbugs';
5 $lib_path = '/usr/lib/debbugs';
7 require("$config_path/config");
8 require("$lib_path/errorlib");
9 $ENV{'PATH'} = $lib_path.':'.$ENV{'PATH'};
11 chdir("$gSpoolDir") || die "chdir spool: $!\n";
15 if ($ARGV[0] eq 'undone') {
16 $vdef= "(no outstanding $gBug reports on file, or problem running script)\n";
17 $subject= "Unanswered problem reports by date";
19 "The following problem reports have not yet been marked as `taken up\' by a
20 message to done\@$gEmailDomain or or `forwarded\' by a
21 message to forwarded\@$gEmailDomain."
23 } elsif ($ARGV[0] eq 'bymaint') {
24 $vdef= "(no outstanding $gBug reports on file, or problem running script)\n";
25 $subject= "Unanswered problem reports by maintainer and package";
27 "The following problem reports have not yet been marked as `taken up\' by a
28 message to done\@$gEmailDomain or or `forwarded\' by a
29 message to forwarded\@$gEmailDomain.
30 The maintainer listed against each package is derived from the Maintainer
31 field of the package found in the development tree; there is an override file
32 that can be amended to get the right results if you have taken over a package
33 and do not expect to issue a new version soon.
35 Variant versions of the Maintainer field for the same actual package
36 maintainer will be listed separately.
38 Maintainers with few outstanding $gBugs appear first, to avoid those with few
39 $gBugs being lost deep in the message.
42 } elsif ($ARGV[0] eq 'veryold') {
44 $subject= "Overdue problem reports by age";
46 "The following problem reports are very old but have not yet been marked
47 as `taken up\' by a message to done\@$gEmailDomain as forwarded
48 to a developer by CCing a message to forwarded\@$gEmailDomain.
49 Please help ensure that these $gBugs are dealt with quickly, even if you
50 are not the package maintainer in question. (NB a full list of outstanding
51 $gBug reports is posted periodically - this is a partial list only!)
54 die "urgk, wrong argument @ARGV";
57 $v=`$lib_path/summary $ARGV[0]`; $? && die "undone failed $?: $!\n";
59 $v= $vdef if $v eq '';
62 open(D, '| '.join(' ',('/usr/lib/sendmail','-f'.$gMaintainerEmail)).' -odq -oem -oi -t') ||
63 die "start sendmail: $!";
65 print D <<END || die "complete sendmail";
66 From: $gMaintainerEmail ($gProject $gBug Tracking System)
67 To: $gSummaryList\@$gListDomain
72 Every Tuesday, the listing by package maintainer is posted.
73 Every Friday, the listing by age of the report is posted.
75 Please see the documentation for more information about how to
76 use the $gBug tracking system. It is available on the WWW at
77 <A HREF=\"$gWebDomain/txt/\">$gWebDomain/txt</A>
81 $? && die "sendmail failed $?: $!\n";
83 print length($v)," bytes of summary posted.\n";