Skip to content

Commit

Permalink
[backend] fix forwarding of full tree cpio requests
Browse files Browse the repository at this point in the history
Only needed for "transitive interconnect" setups, which are currently
not really supported anyway. Still...
  • Loading branch information
mlschroe committed Jun 23, 2014
1 parent 7832313 commit c6333b8
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/backend/bs_srcserver
Original file line number Diff line number Diff line change
Expand Up @@ -6122,6 +6122,16 @@ sub getbinarylist {
# do not check arch in interconnect mode
my $proj = checkprojrepoarch($projid, $repoid, undef, 1);
if (!$BSStdServer::isajax) {
if ($proj->{'remoteurl'} && $view eq 'cpio' && $packid eq '_repository' && !$nosource && @{$cgi->{'binary'} || []}) {
# hand over to worker_getbinaries to get the answer cached
@args = ();
push @args, "project=$projid";
push @args, "repository=$repoid";
push @args, "arch=$arch";
push @args, "binaries=".join(',', @{$cgi->{'binary'} || []});
BSHandoff::handoff($ajaxsocket, '/getbinaries', undef, @args);
exit(0);
}
BSHandoff::handoff($ajaxsocket, "/build/$projid/$repoid/$arch/$packid", undef, @args);
exit(0);
}
Expand All @@ -6131,10 +6141,6 @@ sub getbinarylist {
'receiver' => \&BSServer::reply_receiver,
};
if ($proj->{'remoteurl'}) {
if ($view && $view eq 'cpio') {
# hand over to worker_getbinaries to get the answer cached
return worker_getbinaries($cgi, $projid, $repoid, $arch, $packid);
}
$param->{'uri'} = "$proj->{'remoteurl'}/build/$proj->{'remoteproject'}/$repoid/$arch/$packid";
$param->{'proxy'} = $proxy;
}
Expand Down

0 comments on commit c6333b8

Please sign in to comment.