From 99bb8b26381dc39fed476ed7eb250515ab1fbcf2 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Wed, 18 Oct 2006 15:16:24 -0700 Subject: [PATCH] close race condition when updating bts indices --- scripts/gen-indices.in | 2 ++ 1 file changed, 2 insertions(+) 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"); } -- 2.39.5