From: Steinar H. Gunderson Date: Mon, 18 Jun 2007 14:14:30 +0000 (+0000) Subject: Make the britney count files more-or-less atomically updated. X-Git-Url: https://git.donarmstrong.com/?p=bugscan.git;a=commitdiff_plain;h=affc57cced8db2537cc22ad5f4ed4ed00e7714df Make the britney count files more-or-less atomically updated. --- diff --git a/make-britney-counts b/make-britney-counts index 9a78432..648ec2f 100755 --- a/make-britney-counts +++ b/make-britney-counts @@ -55,19 +55,24 @@ for my $bug (values %scanlib::bugs) { } } -open TESTING, ">", "britney/testing" - or die "britney/testing: $!"; +open TESTING, ">", "britney/testing.new" + or die "britney/testing.new: $!"; for my $pkg (sort keys %testingbugs) { print TESTING "$pkg $testingbugs{$pkg}\n"; } close TESTING; -open UNSTABLE, ">", "britney/unstable" - or die "britney/unstable: $!"; +open UNSTABLE, ">", "britney/unstable.new" + or die "britney/unstable.new: $!"; for my $pkg (sort keys %unstablebugs) { print UNSTABLE "$pkg $unstablebugs{$pkg}\n"; } close UNSTABLE; +rename "britney/testing.new", "britney/testing" + or die "renaming britney/testing.new to britney/testing: $!"; +rename "britney/unstable.new", "britney/unstable" + or die "renaming britney/unstable.new to britney/unstable: $!"; + exit 0;