From: ajt <> Date: Tue, 15 Jul 2003 19:20:32 +0000 (-0800) Subject: [project @ 2003-07-15 12:20:32 by ajt] X-Git-Tag: release/2.6.0~850 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e4b6189d64c610c720546f6604a8f85799378389;p=debbugs.git [project @ 2003-07-15 12:20:32 by ajt] - Add "package" command to service (control@) to limit the bugs that the following commands apply to. --- diff --git a/debian/changelog b/debian/changelog index 4b695f5e..d6327c47 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,9 @@ debbugs (2.4.2) UNRELEASED; urgency=low + * Anthony Towns: + - Add "package" command to service (control@) to limit the bugs that + the following commands apply to. + * Colin Watson: - Add (slightly) fancy CGI decoding of message/* MIME types. - CGI scripts now support multiple maintainers for a single package. diff --git a/scripts/service.in b/scripts/service.in index 52c806a0..929bd694 100755 --- a/scripts/service.in +++ b/scripts/service.in @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: service.in,v 1.78 2003/06/23 11:23:35 cjwatson Exp $ +# $Id: service.in,v 1.79 2003/07/15 12:20:32 ajt Exp $ # ^ more or less ^ # # Usage: service .nn @@ -134,6 +134,7 @@ if (@gFuckheads and $replyto =~ m/$fuckheads/) { $quickabort = 1; } +my %limit_pkgs = (); my %clonebugs = (); my @bcc = (); @@ -600,6 +601,17 @@ END } } } + } elsif (m/^package\s+(\S.*\S)$/i) { + $ok++; + my @pkgs = split /\s+/ $1; + if (scalar(@pkgs) > 0) { + %limit_pkgs = map { ($_, 1) } @pkgs; + &transcript("Ignoring bugs not assigned to: " . + join(" ", keys(%limit_pkgs) . "\n\n"); + } else { + %limit_pkgs = (); + &transcript("Not ignoring any bugs.\n\n"); + } } else { &transcript("Unknown command or malformed arguments to command.\n\n"); if (++$unknowns >= 5) { @@ -769,6 +781,13 @@ sub setbug { &dlex("setbug => 0s"); return 0; } + + if ($keys %limit_pkgs && not defined $limit_pkgs{$s_package}) { + &transcript("$gBug number $ref belongs to package $s_package, skipping."); + &cancelbug; + return 0; + } + @thisbugmergelist= split(/ /,$data->{mergedwith}); if (!@thisbugmergelist) { &foundbug;