From 3f3b1506a0aeb5e913f76373c105a5b9aae34232 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 4 Nov 2005 01:19:19 +0000 Subject: deal with the case where a bug moved from ove CVE id to another, don't unset the tracked flag last in this case, instead, unset it and then re-set it. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@2659 e39458fd-73e7-0310-bf30-c45bca0a0e42 --- bin/bts-update | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'bin/bts-update') diff --git a/bin/bts-update b/bin/bts-update index 545c65068d..99e15d9a7d 100755 --- a/bin/bts-update +++ b/bin/bts-update @@ -30,6 +30,16 @@ foreach my $bug (keys %old) { } } +# Remove tags for all old stuff. Hs to come before adding tags for new +# stuff, to deal with edge cases where bugs move between CVE ids. +foreach my $bug (keys %old) { + foreach my $cve (keys %{$old{$bug}}) { + push @changes, "usertag $bug - $cve" + unless $cve =~ /CVE-\d+-XXXX/; + push @changes, "usertag $bug - tracked"; + } +} + # Add tags for all new stuff. foreach my $bug (keys %new) { foreach my $cve (keys %{$new{$bug}}) { @@ -39,15 +49,6 @@ foreach my $bug (keys %new) { } } -# Remove tags for all old stuff. -foreach my $bug (keys %old) { - foreach my $cve (keys %{$old{$bug}}) { - push @changes, "usertag $bug - $cve" - unless $cve =~ /CVE-\d+-XXXX/; - push @changes, "usertag $bug - tracked"; - } -} - if (system("cp", $list, $oldlist) != 0) { die "failed to copy $list to $oldlist, didn't send any mail"; } -- cgit v1.2.3