2 # DebianExtra.pl: Extra stuff for debian
4 # Version: v0.1 (20000520)
15 if (!defined $args or $args =~ /^$/) {
19 if ($args =~ /^(\d+)$/) {
23 } elsif ($args =~ /^(\S+\@\S+)$/) {
24 # package email maintainer.
27 } elsif ($args =~ /^(\S+)$/) {
33 &::msg($::who, "error: could not parse $args");
38 my @results = &::getURL("http://master.debian.org/~wakkerma/bugs");
39 my ($date, $rcbugs, $remove);
40 my ($bugs_closed, $bugs_opened) = (0,0);
42 if (scalar @results) {
45 $date = $1 if (/status at (.*)\s*$/);
46 $rcbugs = $1 if (/bugs: (\d+)/);
47 $remove = $1 if (/REMOVE\S+ (\d+)\s*$/);
48 if (/^(\d+) r\S+ b\S+ w\S+ c\S+ a\S+ (\d+)/) {
53 my $xtxt = ($bugs_closed >=$bugs_opened) ?
55 "Oh no, the bug count is rising -- ";
57 &::performStrictReply(
58 "Debian bugs statistics, last updated on $date... ".
59 "There are \002$rcbugs\002 release-critical bugs; $xtxt".
60 "\002$bugs_closed\002 bugs closed, opening \002$bugs_opened\002 bugs. ".
61 "About \002$remove\002 packages will be removed."
64 &::msg($::who, "Couldn't retrieve data for debian bug stats.");
70 my $url = "http://bugs.debian.org/$num";
73 &::msg($::who, "do_id not supported yet.");
77 my @results = &::getURL($url);
79 &::DEBUG("do_id: $_");
85 my $url = "http://bugs.debian.org/$email";
88 &::msg($::who, "do_email not supported yet.");
92 my @results = &::getURL($url);
94 &::DEBUG("do_email: $_");
100 my $url = "http://bugs.debian.org/$pkg";
102 my @results = &::getURL($url);
104 &::DEBUG("do_pkg: $_");