show-bugs script: show release-critical bugs on installed packages
Since the three-line show-bugs script that Colin Watson posted to one
of the Debian mailing lists no longer works, I re-wrote it in perl.
The attached script will display the release-critical bugs in all
packages you have installed.
#!/usr/bin/perl
# show open bugs on packages being used
# by Blars <blarson@blars.org>
# based on shell script by Colin Watson <cjwatson@debian.org>
use strict;
my %packages = ();
open GETSEL, "dpkg --get-selections|" or die "Could not dpkg --get-selections";
while ($_ = <GETSEL>) {
if (/^([a-z\-\.\d]+)\s+install/) {
$packages{$1} = 1;
}
}
close GETSEL;
open BUGS, "w3m -dump http://bugs.debian.org/release-critical/other/all.html |"
or die "Could not connect to bugs.debian.org";
while ($_ = <BUGS>) {
if (/^Package\:\s+([a-z\-\.\d]+)\s+/ && exists $packages{$1}) {
print $_;
while ($_ = <BUGS>) {
print $_;
last if (/^(?:\s*|\:S\])$/);
}
}
}
close BUGS;
Reply to: