From 162921624c8d8962795b0d0b2f741437f24f4e05 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Sun, 8 Oct 2006 22:47:15 -0700 Subject: [PATCH] fix gen-indices; add back in postprocess stuff --- scripts/gen-indices.in | 5 +++-- scripts/processall.in | 10 ++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/gen-indices.in b/scripts/gen-indices.in index 84af448e..4991df0b 100755 --- a/scripts/gen-indices.in +++ b/scripts/gen-indices.in @@ -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"}) { diff --git a/scripts/processall.in b/scripts/processall.in index 9b1901f1..1d7496d1 100755 --- a/scripts/processall.in +++ b/scripts/processall.in @@ -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); -- 2.39.5