#!/usr/bin/perl -w # by sf@sfritsch.de # licensed under GPL 2 # needs libwww-perl and apt-show-versions use LWP::Simple; my $URL="http://qa.debian.org/bts-security.html"; unless (defined ($content = get $URL)) { die "Could not get $URL\n"; } my %instdebs; my @dists=("woody","sarge","etch","sid"); open(APT,"apt-show-versions|") or die "could not run apt-show-versions\n"; while() { m|^([^\s/]+)/(\S+)| or next; $instdebs{$1}=$2; } close(APT); my @records=split(/

/i, $content); my $first=1; PACKAGE: foreach my $r (@records) { $r =~ m|packages.debian.org/([^"\s]+)"|s or next; my $package=$1; my $dist=$instdebs{$package} or next; #package ist installed $r =~ m/^Tags:(.*?)$/ms; my $tags=$1; foreach (@dists) { if ($tags =~ /$_(?!-ignore)/i) { #bug has a distribution tag if ($tags !~ /$dist(?!-ignore)/i) { #but the installed version is not affected next PACKAGE; } } } if ($first) { print "\n"; $first=0; } print "$r.

\n"; } print "\n" unless $first;