]> git.donarmstrong.com Git - debbugs.git/blobdiff - scripts/receive.in
[project @ 2002-11-17 22:45:15 by cjwatson]
[debbugs.git] / scripts / receive.in
index d99664ba5b2a2011d82255be9fad2778fd8ba4d5..2fe600fe55777adeb638edd3b4c3478028673179 100755 (executable)
@@ -1,12 +1,16 @@
-#!/usr/bin/perl -w
-# $Id: receive.in,v 1.9 2001/08/16 06:31:12 doogie Exp $
+#!/usr/bin/perl
+# $Id: receive.in,v 1.14 2002/11/17 22:45:16 cjwatson Exp $
 # usage: mail is piped directly into program
 
 #set umask in order to have group-writable incoming/*
-#umask 002;
+#umask(002);
 
 #load configuration file
-require( '/etc/debbugs/config' );
+$config_path = '/etc/debbugs';
+#$lib_path = '/usr/lib/debbugs';
+
+require "$config_path/config";
+$ENV{'PATH'} = '/usr/lib/debbugs:'.$ENV{'PATH'};
 
 #set source of mail delivery
 #sets any prefix needed to get mailer to add it to error mail
@@ -38,11 +42,13 @@ y/A-Z/a-z/;
                    '-maintonly',  'M',
                    '-quiet',      'Q',
                    '-forwarded',  'F',
-                  '-fixed',      'X',
                    '-done',       'D',
                    '-close',      'D',
+                  '-request',    'R',
                    '-submitter',  'U');
 
+%withpkgaddressmap= ('-request',     'R');
+
 %withoutaddressmap= ('submit',     'B',
                       'bugs',       'B',
                       'maintonly',  'M',
@@ -59,6 +65,10 @@ if (s/^(\d{1,9})\b//) {
     $bugnumber= $1;
     $map= $withbugaddressmap{$_};
     $addrrec= "$bugnumber$_";
+} elsif (s/^(\w+)-//) {
+    $bugnumber= $1;
+    $map= $withpkgaddressmap{"-$_"};
+    $addrrec= "$bugnumber-$_";
 } else {
     $bugnumber= '';
     $map= $withoutaddressmap{$_};