]> git.donarmstrong.com Git - debbugs.git/blobdiff - scripts/expire.in
[project @ 2001-04-17 14:46:54 by ajt]
[debbugs.git] / scripts / expire.in
index 83378c345c4de7604dd6b410dc5158a1f939438e..cbc5d467ec2a7482454e42bb67352d3631f7d1b1 100755 (executable)
@@ -1,11 +1,11 @@
 #!/usr/bin/perl
-# $Id: expire.in,v 1.4 1999/09/16 07:16:47 gecko Exp $
+# $Id: expire.in,v 1.6 2000/10/07 17:27:13 joy Exp $
 
 # Load modules and set envirnment
 require('/etc/debbugs/config');
 require('/usr/lib/debbugs/errorlib');
 use File::Copy;
-$ENV{'PATH'}= '/usr/lib/debbugs'.$ENV{'PATH'};
+$ENV{'PATH'} = '/usr/lib/debbugs:'.$ENV{'PATH'};
 chdir("$gSpoolDir") || die "chdir spool: $!\n";
 
 #global variables
@@ -30,7 +30,7 @@ grep(s/\.status$//,@list);
 
 #process each bug (ie, status file)
 while (length($ref=shift(@list))) 
-{      print STDERR "$ref $considering\n" if $debug;
+{      print STDERR "$ref considering\n" if $debug;
     $bfound= &lockreadbugmerge($ref);
        print STDERR "$ref read $bfound\n" if $debug;
     $bfound || next;
@@ -73,6 +73,11 @@ while (length($ref=shift(@list)))
                                copy( "db/$mref.log", "$dir/$mref.log" );
                                copy( "db/$mref.status", "$dir/$mref.status" );
                                copy( "db/$mref.report", "$dir/$mref.report" );
+                               if ( open( IDXFILE, ">>archive/index" ) )
+                               {       printf IDXFILE "%s %d %s\n", $s_package, $mref, $s_subject;
+                                       close IDXFILE;
+                               } else { print "Unable to write to index file\n"; }
+                               
                print("archived $mref to $dir (from $ref)\n") || &quit("output old: $!");
                        }
             unlink("db/$mref.log", "db/$mref.status", "db/$mref.report");