]> git.donarmstrong.com Git - debbugs.git/blobdiff - scripts/mailsummary.in
close race condition when updating bts indices
[debbugs.git] / scripts / mailsummary.in
index 53c94c128073edeb34de4b867ad2c0ce7d1d456d..1ed2e0b509007198108f47906ad1727fa1c18653 100755 (executable)
@@ -1,9 +1,13 @@
 #!/usr/bin/perl
 #!/usr/bin/perl
-# $Id: mailsummary.in,v 1.6 2000/10/14 21:01:22 joy Exp $
+# $Id: mailsummary.in,v 1.11 2003/04/28 23:51:15 cjwatson Exp $
 
 
-require( '/etc/debbugs/config' );
+$config_path = '/etc/debbugs';
+$lib_path = '/usr/lib/debbugs';
+
+require("$config_path/config");
+require("$lib_path/errorlib");
+$ENV{'PATH'} = $lib_path.':'.$ENV{'PATH'};
 
 
-$ENV{'PATH'} = '/usr/lib/debbugs:'.$ENV{'PATH'};
 chdir("$gSpoolDir") || die "chdir spool: $!\n";
 
 #open(DEBUG,">&4");
 chdir("$gSpoolDir") || die "chdir spool: $!\n";
 
 #open(DEBUG,">&4");
@@ -14,7 +18,7 @@ if ($ARGV[0] eq 'undone') {
     $intro=
 "The following problem reports have not yet been marked as `taken up\' by a
 message to done\@$gEmailDomain or or `forwarded\' by a
     $intro=
 "The following problem reports have not yet been marked as `taken up\' by a
 message to done\@$gEmailDomain or or `forwarded\' by a
-message to fowarded\@$gEmailDomain."
+message to forwarded\@$gEmailDomain."
     ;
 } elsif ($ARGV[0] eq 'bymaint') {
     $vdef= "(no outstanding $gBug reports on file, or problem running script)\n";
     ;
 } elsif ($ARGV[0] eq 'bymaint') {
     $vdef= "(no outstanding $gBug reports on file, or problem running script)\n";
@@ -31,7 +35,7 @@ and do not expect to issue a new version soon.
 Variant versions of the Maintainer field for the same actual package
 maintainer will be listed separately.
 
 Variant versions of the Maintainer field for the same actual package
 maintainer will be listed separately.
 
-Maintainers with few outstanding $gBug appear first, to avoid those with few
+Maintainers with few outstanding $gBugs appear first, to avoid those with few
 $gBugs being lost deep in the message.
 "
     ;
 $gBugs being lost deep in the message.
 "
     ;
@@ -41,7 +45,7 @@ $gBugs being lost deep in the message.
     $intro=
 "The following problem reports are very old but have not yet been marked
 as `taken up\' by a message to done\@$gEmailDomain as forwarded
     $intro=
 "The following problem reports are very old but have not yet been marked
 as `taken up\' by a message to done\@$gEmailDomain as forwarded
-to a developer by CCing a message to fowarded\@$gEmailDomain.
+to a developer by CCing a message to forwarded\@$gEmailDomain.
 Please help ensure that these $gBugs are dealt with quickly, even if you
 are not the package maintainer in question.  (NB a full list of outstanding
 $gBug reports is posted periodically - this is a partial list only!)
 Please help ensure that these $gBugs are dealt with quickly, even if you
 are not the package maintainer in question.  (NB a full list of outstanding
 $gBug reports is posted periodically - this is a partial list only!)
@@ -50,12 +54,12 @@ $gBug reports is posted periodically - this is a partial list only!)
     die "urgk, wrong argument @ARGV";
 }
 
     die "urgk, wrong argument @ARGV";
 }
 
-$v=`/usr/lib/debbugs/summary $ARGV[0]`; $? && die "undone failed $?: $!\n";
+$v=`$lib_path/summary $ARGV[0]`; $? && die "undone failed $?: $!\n";
 
 $v= $vdef if $v eq '';
 exit 0 if $v eq '';
 
 
 $v= $vdef if $v eq '';
 exit 0 if $v eq '';
 
-open(D, '| '.join(' ',('/usr/lib/sendmail','-f'.$gMaintainerEmail)).' -odi -oem -oi -t') ||
+open(D, '| '.join(' ',('/usr/lib/sendmail','-f'.$gMaintainerEmail)).' -odq -oem -oi -t') ||
     die "start sendmail: $!";
 
 print D <<END || die "complete sendmail";
     die "start sendmail: $!";
 
 print D <<END || die "complete sendmail";
@@ -66,7 +70,7 @@ Subject: $subject
 $intro
 $v
 Every Tuesday, the listing by package maintainer is posted.
 $intro
 $v
 Every Tuesday, the listing by package maintainer is posted.
-Every Frideay, the listing by age of the report is posted.
+Every Friday, the listing by age of the report is posted.
 
 Please see the documentation for more information about how to
 use the $gBug tracking system.  It is available on the WWW at
 
 Please see the documentation for more information about how to
 use the $gBug tracking system.  It is available on the WWW at