]> git.donarmstrong.com Git - debbugs.git/commitdiff
* Allow tag instead of tags; silently normalize it (closes: #567407).
authorDon Armstrong <don@donarmstrong.com>
Tue, 2 Feb 2010 02:19:02 +0000 (18:19 -0800)
committerDon Armstrong <don@donarmstrong.com>
Tue, 2 Feb 2010 02:19:02 +0000 (18:19 -0800)
  Thanks to Martin Krafft.
* Properly handle Forwarded: at submit@ time (closes: #568020). Thanks
  to Martin Krafft.
* Fix source package src: urls

Debbugs/CGI.pm
cgi/pkgreport.cgi
debian/changelog
scripts/process

index 53f0b5d27487de0018dacc1f7ec4aaa1015e2ec3..d51b9be0a469c5503f4e3648964c36bb2bb31e27 100644 (file)
@@ -400,11 +400,15 @@ sub package_links {
      }
      my @links = ();
      for my $type (qw(src package)) {
-         push @links, map {(munge_url('pkgreport.cgi?',
+         push @links, map {my $t_type = $type;
+                           if ($_ =~ s/^src://) {
+                               $t_type = 'src';
+                           }
+                           (munge_url('pkgreport.cgi?',
                                       %options,
-                                      $type => $_,
+                                      $t_type => $_,
                                      ),
-                            ($type eq 'src'?'src:':'').$_);
+                            ($t_type eq 'src'?'src:':'').$_);
                       } make_list($param{$type}) if exists $param{$type};
      }
      for my $type (qw(maint owner submitter correspondent)) {
index 3fc500b355114472122bee11d936a0f60203b51f..b7fc845a510e50a8c21958c52a42fa236d5e386b 100755 (executable)
@@ -77,7 +77,8 @@ if (exists $param{form_options} and defined $param{form_options}) {
      }
      for my $incexc (qw(include exclude)) {
          next unless exists $param{$incexc};
-         $param{$incexc} = [grep /\S\:\S/, make_list($param{$incexc})];
+         # normalize tag to tags
+         $param{$incexc} = [map {s/^tag:/tags:/} grep /\S\:\S/, make_list($param{$incexc})];
      }
      for my $key (keys %package_search_keys) {
          next unless exists $param{key};
@@ -93,6 +94,16 @@ if (exists $param{form_options} and defined $param{form_options}) {
      exit 0;
 }
 
+# normalize innclude/exclude keys; currently this is in two locations,
+# which is suboptimal. Closes: #567407
+for my $incexc (qw(include exclude)) {
+    next unless exists $param{$incexc};
+    # normalize tag to tags
+    $param{$incexc} = [map {s/^tag:/tags:/} make_list($param{$incexc})];
+}
+
+
+
 # map from yes|no to 1|0
 for my $key (qw(repeatmerged bug-rev pend-rev sev-rev)) {
      if (exists $param{$key}){
index d19a5542c7f6bab14ec1f025efe6d7d0a59cb366..085e8c1d5ed3f2989f1bfcc9a31a72af5b176b9d 100644 (file)
@@ -14,6 +14,11 @@ debbugs (2.4.2~exp1) experimental; urgency=low
     Sandro Tosi.
   * Fix affects for source packages (closes: #563470). Thanks to Charles
     Plessy.
+  * Allow tag instead of tags; silently normalize it (closes: #567407).
+    Thanks to Martin Krafft.
+  * Properly handle Forwarded: at submit@ time (closes: #568020). Thanks
+    to Martin Krafft.
+  * Fix source package src: urls
 
  -- Don Armstrong <don@debian.org>  Wed, 26 Aug 2009 21:32:53 -0700
 
index a3ea9b4a08ff0a21d8ea07dfc8d58bca59ae20de..b8efcc5f5c0fb118b05d9d583dee5d05d3c0be06 100755 (executable)
@@ -587,7 +587,7 @@ if ($ref<0) { # new bug report
         $data->{owner}= $pheader{owner};
     }
     if (defined($pheader{forwarded})) {
-       $data->{'forwarded-to'} = $pheader{forwarded};
+       $data->{forwarded} = $pheader{forwarded};
     }
     &filelock("nextnumber.lock");
     open(N,"nextnumber") || die "nextnumber: read: $!";