]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2002-11-07 11:42:35 by ajt]
authorajt <>
Thu, 7 Nov 2002 19:42:35 +0000 (11:42 -0800)
committerajt <>
Thu, 7 Nov 2002 19:42:35 +0000 (11:42 -0800)
make expire update index.archive.realtime
move the debbugs.trace stuff from expire into errorlib

scripts/errorlib.in
scripts/expire.in

index 34c037a29a22463d66608654bf36934d3efb2bf2..26e2fa3e858b4b6e7be9056198f3b505901fdc0c 100755 (executable)
@@ -1,5 +1,5 @@
 # -*- perl -*-
-# $Id: errorlib.in,v 1.13 2002/11/05 08:33:24 ajt Exp $
+# $Id: errorlib.in,v 1.14 2002/11/07 11:42:35 ajt Exp $
 
 sub F_SETLK { 6; } sub F_WRLCK{ 1; }
 $flockstruct= 'sslll'; # And there ought to be something for this too.
@@ -136,6 +136,19 @@ sub update_realtime {
        return $line;
 }
 
+sub bughook_archive {
+       my $ref = shift;
+       &filelock("debbugs.trace.lock");
+       &appendfile("debbugs.trace","archive $ref\n");
+       my $line = update_realtime(
+               "/org/bugs.debian.org/spool/index.db.realtime", 
+               $ref,
+               "REMOVE");
+       update_realtime("/org/bugs.debian.org/spool/index.archive.realtime",
+               $ref, $line);
+       &unfilelock;
+}      
+
 sub bughook {
        my ( $type, $ref ) = ( shift, shift );
        &filelock("debbugs.trace.lock");
index 70097cbd5b937bba293e8991aedd72f2753c40c8..224fe60de63b96637036548374b966b23f9adc8c 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# $Id: expire.in,v 1.11 2002/11/02 09:21:43 ajt Exp $
+# $Id: expire.in,v 1.12 2002/11/07 11:42:35 ajt Exp $
 
 # Load modules and set envirnment
 use File::Copy;
@@ -79,9 +79,7 @@ while (length($ref=shift(@list))) {
                }
                unlink("db-h/$dir/$mref.log", "db-h/$dir/$mref.status", "db-h/$dir/$mref.report");
                print("deleted $mref (from $ref)\n") || &quit("output old: $!");
-               &filelock("debbugs.trace.lock");
-               &appendfile("debbugs.trace","archive $mref\n");
-               &unfilelock;
+               bughook_archive($mref);
         }
     }
        print "$ref unlocking $bfound\n" if $debug;