From: Don Armstrong Date: Sun, 2 Apr 2017 21:42:29 +0000 (-0700) Subject: change fix to #858671 to split source with split_status_fields X-Git-Tag: release/2.6.0~143 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f75033650b8b549cfeaddee67363d152f93666fa;p=debbugs.git change fix to #858671 to split source with split_status_fields Some consumers of get_bug_status via SOAP were not handling split packages --- diff --git a/Debbugs/Status.pm b/Debbugs/Status.pm index 9723259b..6fe1c1a7 100644 --- a/Debbugs/Status.pm +++ b/Debbugs/Status.pm @@ -307,6 +307,9 @@ my $ditch_empty_space = sub {return &{$ditch_empty}(' ',@_)}; my %split_fields = (package => \&splitpackages, affects => \&splitpackages, + # Ideally we won't have to split source, but because some consumers of + # get_bug_status cannot handle arrayref, we will split it here. + source => \&splitpackages, blocks => $ditch_empty_space, blockedby => $ditch_empty_space, # this isn't strictly correct, but we'll split both of them for @@ -1235,9 +1238,9 @@ sub get_bug_status { $status{package} = '' if not defined $status{package}; $status{"package"} =~ s/\s*$//; - $status{source} = [binary_to_source(binary=>[split /\s*,\s*/, $status{package}], + $status{source} = binary_to_source(binary=>[split /\s*,\s*/, $status{package}], source_only => 1, - )]; + ); $status{"package"} = 'unknown' if ($status{"package"} eq ''); $status{"severity"} = 'normal' if (not defined $status{severity} or $status{"severity"} eq '');