diff options
author | Stefan Fritsch <sf@debian.org> | 2009-06-06 08:13:13 +0000 |
---|---|---|
committer | Stefan Fritsch <sf@debian.org> | 2009-06-06 08:13:13 +0000 |
commit | fe1162072f28b1ce2d4ad055b0de1245ea0003f5 (patch) | |
tree | f3beeec6c03339494504644bac995a662a525544 /bin/check-new-issues | |
parent | 7d09dc4a2410ac4169e1ba1d84221610dde4a677 (diff) |
- make check-new-issues -U ignore removed packages
- add some packages to the removed list
git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@12055 e39458fd-73e7-0310-bf30-c45bca0a0e42
Diffstat (limited to 'bin/check-new-issues')
-rwxr-xr-x | bin/check-new-issues | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/bin/check-new-issues b/bin/check-new-issues index 2044d9f73d..2e875477fa 100755 --- a/bin/check-new-issues +++ b/bin/check-new-issues @@ -78,6 +78,7 @@ if ($opts{c}) { my $datafile="$basedir/data/CVE/list"; my $allitemsfile="gunzip -c $basedir/../allitems.txt.gz|"; my $allitemsurl="http://cve.mitre.org/data/downloads/allitems.txt.gz"; +my $removedfile="$basedir/data/packages/removed-packages"; my $issue_regexp= $opts{i} || 'CVE-20(?:0[3-9]|1[0-9])'; my $todo_regexp= $opts{t} || ( $opts{T} ? '^\s+TODO: check' : '^\s+TODO: check$' ); @@ -112,7 +113,10 @@ my @ignore_missing_bug_list = qw/linux-2.6 linux-2.6.24 gnutls11 /; my %ignore_missing_bug; -$ignore_missing_bug{$_} = 1 for @ignore_missing_bug_list; +if ($opts{u} || $opts{U}) { + push @ignore_missing_bug_list, read_removed_packages_file($removedfile); + $ignore_missing_bug{$_} = 1 for @ignore_missing_bug_list; +} foreach my $entry (@{$entries}) { my $name; @@ -423,3 +427,20 @@ sub search_embed { } return $found; } + +sub read_removed_packages_file { + my $file = shift; + + open(my $fh, "<", $file) or die "could not open $file"; + my @packages; + my $line; + while (defined ($line = <$fh>)) { + chomp $line; + $line =~ s/^\s+//; + $line =~ s/\s+$//; + next if $line =~ /^$/; + next if $line =~ /^#/; + push @packages, $line; + } + return @packages; +} |