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 authored and adrianschroeter committed Jun 23, 2014
1 parent a542bcb commit eef6c42
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 @@ -6103,6 +6103,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 @@ -6112,10 +6122,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 eef6c42

Please sign in to comment.