]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2003-07-15 12:20:32 by ajt]
authorajt <>
Tue, 15 Jul 2003 19:20:32 +0000 (11:20 -0800)
committerajt <>
Tue, 15 Jul 2003 19:20:32 +0000 (11:20 -0800)
- Add "package" command to service (control@) to limit the bugs that
  the following commands apply to.

debian/changelog
scripts/service.in

index 4b695f5e1b0c31a9bc2829b5789aa5335677a106..d6327c47275b426b0996ad318f0e84f36ff14a66 100644 (file)
@@ -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.
index 52c806a01ba2382909cfe70bec7dc8f5c6992b09..929bd69452183fa401a949629e5f5fce0e3fbae9 100755 (executable)
@@ -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 <code>.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;