Skip to content

Commit

Permalink
[backend] fix typo that made getmodulemd ignore the configured modules
Browse files Browse the repository at this point in the history
The module names are passed as "module", not "modules".
  • Loading branch information
mlschroe committed Sep 7, 2021
1 parent a0d4002 commit 1a27956
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/backend/BSRepServer/BuildInfo.pm
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ sub getmodulemddata {
push @args, "package=$buildinfo->{'modularity_package'}";
push @args, "srcmd5=$buildinfo->{'modularity_srcmd5'}";
push @args, "arch=$buildinfo->{'arch'}";
push @args, map {"module=$_"} @{$buildinfo->{'module'}};
push @args, map {"module=$_"} @{$buildinfo->{'module'} || []};
push @args, "modularityplatform=$buildinfo->{'modularity_platform'}";
push @args, "modularitylabel=$buildinfo->{'modularity_label'}";
push @args, "view=yaml";
Expand Down
2 changes: 1 addition & 1 deletion src/backend/bs_srcserver
Original file line number Diff line number Diff line change
Expand Up @@ -5916,7 +5916,7 @@ sub getmodulemd {
my $mds = BSSrcServer::Modulemd::read_modulemds($yaml);
for my $md (@$mds) {
next unless $md->{'document'} eq 'modulemd';
BSSrcServer::Modulemd::tostream($md, $cgi->{'modules'} || [], $cgi->{'modularitylabel'}, $cgi->{'modularityplatform'});
BSSrcServer::Modulemd::tostream($md, $cgi->{'module'} || [], $cgi->{'modularitylabel'}, $cgi->{'modularityplatform'});
$md->{'data'}->{'arch'} = $cgi->{'arch'} if $cgi->{'arch'};
}
my $view = $cgi->{'view'} || 'storable';
Expand Down
2 changes: 1 addition & 1 deletion src/backend/bs_worker
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ sub getmodulemddata {
my ($buildinfo, $dir) = @_;
my $server = $buildinfo->{'srcserver'} || $srcserver;
my @args;
push @args, map {"module=$_"} @{$buildinfo->{'module'}};
push @args, map {"module=$_"} @{$buildinfo->{'module'} || []};
push @args, "modularityplatform=$buildinfo->{'modularity_platform'}";
push @args, "modularitylabel=$buildinfo->{'modularity_label'}";
my $mds = BSRPC::rpc({
Expand Down

0 comments on commit 1a27956

Please sign in to comment.