]> git.donarmstrong.com Git - debbugs.git/commitdiff
close race condition when updating bts indices
authorDon Armstrong <don@archimedes>
Wed, 18 Oct 2006 22:16:24 +0000 (15:16 -0700)
committerDon Armstrong <don@archimedes>
Wed, 18 Oct 2006 22:16:24 +0000 (15:16 -0700)
scripts/gen-indices.in

index 8c991adcea85829496934cd36dc579529af48412..05136f663385549d0d15475230151edb7841ecee 100755 (executable)
@@ -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");
 }