# -*- 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.
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");
#!/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;
}
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;