From affc57cced8db2537cc22ad5f4ed4ed00e7714df Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 18 Jun 2007 14:14:30 +0000 Subject: [PATCH 1/1] Make the britney count files more-or-less atomically updated. --- make-britney-counts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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; -- 2.39.2