]> git.donarmstrong.com Git - debbugs.git/blobdiff - scripts/service
merge changes from dla source tree
[debbugs.git] / scripts / service
index 3a50ad435c53e3e5cbed3426267fd1d0b3ff712e..ccdd0f778af34b6e42e1520a84a634e2a33dbeaf 100755 (executable)
@@ -17,7 +17,7 @@ use Params::Validate qw(:types validate_with);
 
 use Debbugs::Common qw(:util :quit :misc :lock);
 
-use Debbugs::Status qw(:read :status :write :versions);
+use Debbugs::Status qw(:read :status :write :versions :hook);
 
 use Debbugs::MIME qw(decode_rfc1522 encode_rfc1522);
 use Debbugs::Mail qw(send_mail_message);
@@ -107,7 +107,7 @@ if ( defined($header{'reply-to'}) && $header{'reply-to'} ne "" ) {
 
 # This is an error counter which should be incremented every time there is an error.
 my $errors = 0;
-my $controlrequestaddr= ($control ? 'control' : 'request').$config{email_domain};
+my $controlrequestaddr= ($control ? 'control' : 'request').'@'.$config{email_domain};
 my $transcript_scalar = '';
 my $transcript = IO::Scalar->new(\$transcript_scalar) or
      die "Unable to create new IO::Scalar";
@@ -387,12 +387,14 @@ END
            Debbugs::User::read_usertags(\%ut, $user);
             my @oldtags = (); my @newtags = (); my @badtags = ();
            my %chtags;
-           for my $t (split /[,\s]+/, $tags) {
-               if ($t =~ m/^[a-zA-Z0-9.+\@-]+$/) {
-                   $chtags{$t} = 1;
-               } else {
-                   push @badtags, $t;
-               }
+           if (defined $tags and length $tags) {
+                for my $t (split /[,\s]+/, $tags) {
+                     if ($t =~ m/^[a-zA-Z0-9.+\@-]+$/) {
+                          $chtags{$t} = 1;
+                     } else {
+                          push @badtags, $t;
+                     }
+                }
            }
            if (@badtags) {
                 print {$transcript} "Ignoring illegal tag/s: ".join(', ', @badtags).".\nPlease use only alphanumerics, at, dot, plus and dash.\n";
@@ -777,7 +779,7 @@ END
                 do {
                     $affected_packages{$data->{package}} = 1;
                    add_recipients(data => $data,
-                                  recipients => \%recipients.
+                                  recipients => \%recipients,
                                   transcript   => $transcript,
                                   ($dl > 0 ? (debug => $transcript):()),
                                  );
@@ -883,7 +885,7 @@ END
        $ok++;
        my $bugnum = $2; my $blockers = $4;
        my $addsub = "add";
-       $addsub = "sub" if ($1 eq "un");
+       $addsub = "sub" if (defined $1 and $1 eq "un");
        if ($bugnum =~ m/^-\d+$/ && defined $clonebugs{$bugnum}) {
             $bugnum = $clonebugs{$bugnum};
        }