- $status{"package"} = 'unknown' if ($status{"package"} eq '');
- $status{"severity"} = 'normal' if (not defined $status{severity} or $status{"severity"} eq '');
-
- $status{"pending"} = 'pending';
- $status{"pending"} = 'forwarded' if (length($status{"forwarded"}));
- $status{"pending"} = 'pending-fixed' if ($tags{pending});
- $status{"pending"} = 'fixed' if ($tags{fixed});
-
-
- my $presence = bug_presence(status => \%status,
- map{(exists $param{$_})?($_,$param{$_}):()}
- qw(bug sourceversions arch dist version found fixed package)
- );
- if (defined $presence) {
- if ($presence eq 'fixed') {
- $status{pending} = 'done';
- }
- elsif ($presence eq 'absent') {
- $status{pending} = 'absent';
- }
+ if (defined $param{bugusertags}{$param{bug}}) {
+ $status->{keywords} = "" unless defined $status->{keywords};
+ $status->{keywords} .= " " unless $status->{keywords} eq "";
+ $status->{keywords} .= join(" ", @{$param{bugusertags}{$param{bug}}});
+ }
+ $status->{tags} = $status->{keywords};
+ my %tags = map { $_ => 1 } split ' ', $status->{tags};
+
+ $status->{package} = '' if not defined $status->{package};
+ $status->{"package"} =~ s/\s*$//;
+
+ $status->{source} = binary_to_source(binary=>[split /\s*,\s*/, $status->{package}],
+ source_only => 1,
+ cache => $bin_to_src_cache,
+ defined $param{schema}?
+ (schema => $param{schema}):(),
+ );
+
+ $status->{"package"} = 'unknown' if ($status->{"package"} eq '');
+ $status->{"severity"} = 'normal' if (not defined $status->{severity} or $status->{"severity"} eq '');
+
+ $status->{"pending"} = 'pending';
+ $status->{"pending"} = 'forwarded' if (length($status->{"forwarded"}));
+ $status->{"pending"} = 'pending-fixed' if ($tags{pending});
+ $status->{"pending"} = 'fixed' if ($tags{fixed});
+
+
+ my $presence = bug_presence(status => $status,
+ bug => $bug,
+ map{(exists $param{$_})?($_,$param{$_}):()}
+ qw(sourceversions arch dist version found fixed package)
+ );
+ if (defined $presence) {
+ if ($presence eq 'fixed') {
+ $status->{pending} = 'done';
+ } elsif ($presence eq 'absent') {
+ $status->{pending} = 'absent';
+ }
+ }