]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2002-12-11 02:15:15 by cjwatson]
authorcjwatson <>
Wed, 11 Dec 2002 10:15:15 +0000 (02:15 -0800)
committercjwatson <>
Wed, 11 Dec 2002 10:15:15 +0000 (02:15 -0800)
db2html works with db-h now, I think.

debian/changelog
debian/crontab
misc/crontab.in
scripts/db2html.in

index 530c500d3b0c268c769a48978e8ccd103161b86e..7739e58bf249bfbdfd044a3f12c4946a63557879 100644 (file)
@@ -12,6 +12,7 @@ debbugs (2.4.1) UNRELEASED; urgency=low
   * Remove the final use of cgi-lib.pl, so it's gone. Remove copyright
     notices that were there due to using it. [Colin]
   * Accept ';' as well as '&' as a CGI argument separator. [Colin]
+  * db2html now works with the new hashed database layout. [Colin]
 
  -- Colin Watson <cjwatson@debian.org>  Mon, 25 Nov 2002 03:50:20 +0000
 
index 20e2c7d848e1d1c1ecc432a5bbe6e4d9ed5e42e0..a882fac1a0e297c5affcf068f64223c55827f676 100644 (file)
@@ -2,7 +2,7 @@
 MAILTO=owner@bugs.benham
 3,18,33,48     *       * * *   /usr/lib/debbugs/processall >/dev/null
 9,39           *       * * *   /usr/lib/debbugs/html-control >/dev/null
-22                     7       * * *   touch /var/lib/debbugs/spool/db
+22                     7       * * *   touch /var/lib/debbugs/spool/db-h
 23                     7       * * 3   /usr/lib/debbugs/age-1
 24                     7       * * *   /usr/lib/debbugs/expire >/dev/null
 23                     16      * * 5   /usr/lib/debbugs/mailsummary undone >/dev/null
index ebedc46919362c5209b1fc6963b446aa55492119..144c1150a2368f38ad419d1e2dc6552cc7a2ecb1 100644 (file)
@@ -3,7 +3,7 @@
 DBC_CRONTAB_MAILTO
 DBC_PROCESS_FREQ       * * *   DBC_SCRIPT_PATH/processall >/dev/null
 DBC_HTMLCHECK_FREQ     * * *   DBC_SCRIPT_PATH/html-control >/dev/null
-22 7                   * * *   touch DBC_SPOOL_PATH/db
+22 7                   * * *   touch DBC_SPOOL_PATH/db-h
 23 7                   * * 3   DBC_SCRIPT_PATH/age-1
 24 7                   * * *   DBC_SCRIPT_PATH/expire >/dev/null
 23 16                  * * 5   DBC_SCRIPT_PATH/mailsummary undone >/dev/null
index 388c8ac1ec4c3a009243dcf21e4db710d0805f28..2c8813a031986149d6c97276b1b613268ad28c58 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# $Id: db2html.in,v 1.12 2002/11/25 13:53:44 cjwatson Exp $
+# $Id: db2html.in,v 1.13 2002/12/11 02:15:15 cjwatson Exp $
 # usage: db2html [-diff] [-stampfile=<stampfile>] [-lastrun=<days>] <wwwbase>
 
 #load the necessary libraries/configuration
@@ -60,7 +60,7 @@ if (defined($stampfile))
 }
 
 #only process file if greater than last run...
-if (defined($lastrun) && -M "db" > $lastrun) 
+if (defined($lastrun) && -M "db-h" > $lastrun) 
 {      $_= $gHTMLStamp;
     s/SUBSTITUTE_DTIME/$dtime/o;
     s/\<\!\-\-updateupdate\-\-\>.*\<\!\-\-\/updateupdate\-\-\>/check/;
@@ -81,9 +81,14 @@ while(<MM>)
 close(MM);
 
 #load all database files
-opendir(D,'db') || &quit("opendir db: $!");
-@files= sort { $a <=> $b } readdir(D);
+opendir(D,'db-h') || &quit("opendir db-h: $!");
+@dirs = sort { $a <=> $b } grep(s#^#db-h/#,grep(/^\d+$/,readdir(D)));
 closedir(D);
+foreach my $dir (@dirs) {
+    opendir(D,$dir);
+    push @files, sort { $a <=> $b } grep(/^-?\d+\.log$/,readdir(D));
+    closedir(D);
+}
 
 for $pending (qw(pending done forwarded)) 
 {      for $severity (@showseverities)