From: Don Armstrong Date: Wed, 18 Oct 2006 22:16:24 +0000 (-0700) Subject: close race condition when updating bts indices X-Git-Tag: release/2.6.0~593^2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=99bb8b26381dc39fed476ed7eb250515ab1fbcf2;p=debbugs.git close race condition when updating bts indices --- diff --git a/scripts/gen-indices.in b/scripts/gen-indices.in index 8c991adc..05136f66 100755 --- a/scripts/gen-indices.in +++ b/scripts/gen-indices.in @@ -86,6 +86,7 @@ if ($ARGV[0] eq "archive") { my @indexes = ('package', 'tag', 'severity', 'submitter-email'); my %index = (); my $time = undef; +my $start_time = time; for my $i (@indexes) { %{$index{$i}} = {}; if ($options{quick}) { @@ -161,4 +162,5 @@ while (my $dir = shift @dirs) { for my $i (@indexes) { untie %{$indexes{$i}}; move("$indexdest/by-$i$suffix.idx.new", "$indexdest/by-$i$suffix.idx"); + system('touch','-d',"1/1/1970 + ${start_time}secs","$indexdest/by-$i$suffix.idx"); }