From a5ad973514b53f467cf2cd7c2e261fd06986db85 Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Sat, 6 Jun 2009 08:13:13 +0000 Subject: - 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 --- bin/check-new-issues | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'bin/check-new-issues') 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; +} -- cgit v1.2.3