]> git.donarmstrong.com Git - debbugs.git/commitdiff
fix gen-indices; add back in postprocess stuff
authorDon Armstrong <don@volo>
Mon, 9 Oct 2006 05:47:15 +0000 (22:47 -0700)
committerDon Armstrong <don@volo>
Mon, 9 Oct 2006 05:47:15 +0000 (22:47 -0700)
scripts/gen-indices.in
scripts/processall.in

index 84af448ebe1092aecb89d4d92eed2cbbf2c8aa2a..4991df0b6c210ddcaf9e0245aa61becaee684c67 100755 (executable)
@@ -14,6 +14,7 @@ use Getopt::Long;
 use Pod::Usage;
 
 use File::stat;
+use List::Util qw(min);
 
 =head1 NAME
 
@@ -91,7 +92,7 @@ for my $i (@indexes) {
             if (-e "$indexdest/by-$i${suffix}.idx") {
                  system('cp','-a',"$indexdest/by-$i${suffix}.idx","$indexdest/by-$i${suffix}.idx.new") == 0
                       or die "Error creating the new index";
-                 my $stat = stat("$indexdest/by-$i${suffix}.idx");
+                 my $stat = stat("$indexdest/by-$i${suffix}.idx") or die "Unable to stat $indexdest/by-$i${suffix}.idx";
                  $time = defined $time ? min($time,$stat->mtime) : $stat->mtime;
             }
             tie %{$index{$i}}, DB_File => "$indexdest/by-$i$suffix.idx.new",
@@ -142,7 +143,7 @@ while (my $dir = shift @dirs) {
 
        for my $f (@list) {
                print "Up to $cnt bugs...\n" if (++$cnt % 100 == 0 && $verbose);
-               my $stat = stat($f);
+               my $stat = stat(getbugcomponent($f,'summary');
                next if $stat->mtime < $time;
                my $fdata = readbug($f, $initialdir);
                for my $p (split /[\s,]+/, $fdata->{"package"}) {
index 9b1901f19b5afefa4cacf36d939612a6eaed61f2..1d7496d1dcc03218f13289199be0751a7f3637be 100755 (executable)
@@ -69,6 +69,16 @@ for (;;) {
     rmtree("$gSpoolDir/mime.tmp",0,1);
     $ndone++;
 }
+
+
+system("$lib_path/gen-indices",'--quick') == 0 or print STDERR "gen-indices failed\n";
+
+if (@gPostProcessall) {
+    system @gPostProcessall == 0 or print STDERR "\@gPostProcessall failed: ".join(' ',@gPostProcessall)."\n";
+}
+
+
+
 &unfilelock;
 
 exit(0);