Skip to content

Commit

Permalink
[backend] bs_srcserver: add remotemaponly option
Browse files Browse the repository at this point in the history
We need this to fetch missing entries in the scheduler's remotemap.
  • Loading branch information
mlschroe committed Jun 27, 2017
1 parent bd754c9 commit 298974f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/backend/bs_srcserver
Expand Up @@ -963,6 +963,10 @@ sub getprojpack {
$cgi->{'ignoredisable'} = 1;
$cgi->{'nopackages'} = 1 unless @{$packids || []};
}
if ($cgi->{'remotemaponly'}) {
die("getprojpack remotemaponly makes no sense with packages\n") if @{$packids || []};
$cgi->{'withremotemap'} = 1;
}
my $partition = $cgi->{'partition'};
die("No such partition '$partition'\n") if $partition && $BSConfig::partitionservers && !$BSConfig::partitionservers->{$partition};
my $remotemap = $cgi->{'withremotemap'} ? {} : undef;
Expand Down Expand Up @@ -1027,6 +1031,7 @@ sub getprojpack {
$remotemap->{$projid} = {%$r, 'proto' => 1} if $r;
}
}
next if $cgi->{'remotemaponly'};
if (!$proj && $cgi->{'parseremote'} && $cgi->{'project'} && $remotemap && $remotemap->{$projid}) {
$proj = $remotemap->{$projid};
}
Expand Down Expand Up @@ -5952,7 +5957,7 @@ my $dispatches = [
'/published/$project/$repository/$arch:filename/$filename/$subfilename:filename view:?' => \&published,

# scheduler calls
'/getprojpack $project* $repository* $package* $arch? withrepos:bool? withsrcmd5:bool? withdeps:bool? withconfig:bool? expandedrepos:bool? ignoredisable:bool? nopackages:bool? withremotemap:bool? noremote:bool? parseremote:bool? buildinfo:bool? partition:? view:?' => \&getprojpack,
'/getprojpack $project* $repository* $package* $arch? withrepos:bool? withsrcmd5:bool? withdeps:bool? withconfig:bool? expandedrepos:bool? ignoredisable:bool? nopackages:bool? withremotemap:bool? remotemaponly:bool? noremote:bool? parseremote:bool? buildinfo:bool? partition:? view:?' => \&getprojpack,
'POST:/relsync $project $repository $arch' => \&postrelsync,
'/relsync $project $repository $arch' => \&getrelsync,

Expand Down

0 comments on commit 298974f

Please sign in to comment.