From: Don Armstrong Date: Tue, 2 Feb 2010 02:19:02 +0000 (-0800) Subject: * Allow tag instead of tags; silently normalize it (closes: #567407). X-Git-Tag: release/2.6.0~428^2~5 X-Git-Url: https://git.donarmstrong.com/?p=debbugs.git;a=commitdiff_plain;h=d2412a4be9ae41d2ce8db837350036f71aa6076d * 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 --- diff --git a/Debbugs/CGI.pm b/Debbugs/CGI.pm index 53f0b5d..d51b9be 100644 --- a/Debbugs/CGI.pm +++ b/Debbugs/CGI.pm @@ -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)) { diff --git a/cgi/pkgreport.cgi b/cgi/pkgreport.cgi index 3fc500b..b7fc845 100755 --- a/cgi/pkgreport.cgi +++ b/cgi/pkgreport.cgi @@ -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}){ diff --git a/debian/changelog b/debian/changelog index d19a554..085e8c1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Wed, 26 Aug 2009 21:32:53 -0700 diff --git a/scripts/process b/scripts/process index a3ea9b4..b8efcc5 100755 --- a/scripts/process +++ b/scripts/process @@ -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: $!";