diff options
author | Joey Hess <joeyh@debian.org> | 2005-11-04 01:19:19 +0000 |
---|---|---|
committer | Joey Hess <joeyh@debian.org> | 2005-11-04 01:19:19 +0000 |
commit | 3f3b1506a0aeb5e913f76373c105a5b9aae34232 (patch) | |
tree | 92288a93b15877bd513b3ab0a46287f182190a9c /bin/bts-update | |
parent | 7d78d5f1cec9c2f7326e01a23cd5bc89905e6e83 (diff) |
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
Diffstat (limited to 'bin/bts-update')
-rwxr-xr-x | bin/bts-update | 19 |
1 files changed, 10 insertions, 9 deletions
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"; } |