X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debbugs%2FSOAP.pm;h=32e874e0b366626982412b5e6609add1a67c67e1;hb=72e977729d964c9093a34fadf236478698ca4686;hp=9aacda401adce4ba9b221702c5e6622f803bc551;hpb=46331f78300d42fa531aef1856fa523bcd5c493a;p=debbugs.git diff --git a/Debbugs/SOAP.pm b/Debbugs/SOAP.pm index 9aacda4..32e874e 100644 --- a/Debbugs/SOAP.pm +++ b/Debbugs/SOAP.pm @@ -42,6 +42,7 @@ BEGIN{ use IO::File; use Debbugs::Status qw(get_bug_status); use Debbugs::Common qw(make_list getbuglocation getbugcomponent); +use Debbugs::Packages; use Storable qw(nstore retrieve); use Scalar::Util qw(looks_like_number); @@ -127,8 +128,10 @@ sub get_status { my $bug_status; if (ref($bug)) { my %param = __collapse_params(@{$bug}); + next unless defined $param{bug}; + $bug = $param{bug}; $bug_status = get_bug_status(map {(exists $param{$_})?($_,$param{$_}):()} - qw(bug dist arch bugusertags sourceversions version) + qw(bug dist arch bugusertags sourceversions version indicatesource) ); } else { @@ -222,13 +225,7 @@ sub get_bug_log{ my $VERSION = __populate_version(pop); my ($self,$bug,$msg_num) = @_; - my $location = getbuglocation($bug,'log'); - my $bug_log = getbugcomponent($bug,'log',$location); - - my $log_fh = IO::File->new($bug_log, 'r') or - die "Unable to open bug log $bug_log for reading: $!"; - - my $log = Debbugs::Log->new($log_fh) or + my $log = Debbugs::Log->new(bug_num => $bug) or die "Debbugs::Log was unable to be initialized"; my %seen_msg_ids; @@ -271,8 +268,9 @@ versions for all architectures, with any duplicates removed. sub binary_to_source{ my $VERSION = __populate_version(pop); + my ($self,@params) = @_; - return [binarytosource(@_)]; + return [Debbugs::Packages::binarytosource(@params)]; } =head2 source_to_binary @@ -291,8 +289,9 @@ architecture is not returned. sub source_to_binary { my $VERSION = __populate_version(pop); + my ($self,@params) = @_; - return [source_to_binary(@_)]; + return [Debbugs::Packages::sourcetobinary(@params)]; } =head2 get_versions @@ -335,8 +334,9 @@ This function correponds to L sub get_versions{ my $VERSION = __populate_version(pop); + my ($self,@params) = @_; - return scalar get_versions(@_); + return scalar Debbugs::Packages::get_versions(@params); } =head1 VERSION COMPATIBILITY