Skip to content

Commit

Permalink
[backend] get_modulemd: make use of passed module information
Browse files Browse the repository at this point in the history
This somehow was left out in the implementation.
  • Loading branch information
mlschroe committed Sep 7, 2021
1 parent ebbdc1e commit b5ebbc2
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/backend/BSSrcServer/Modulemd.pm
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ sub tostream {
}
$md = $md->{'data'};
my ($versionprefix, $distprefix, @distprovides) = split(':', $modularityplatform);
my %distprovides = map {$_ => 1} @distprovides;
my %distprovides = map {$_ => $_} @distprovides;
for (@distprovides) {
$distprovides{"$1-*"} = $_ if /^(.*)-/;
}
Expand All @@ -133,7 +133,13 @@ sub tostream {
last unless $good;
}
next unless $good;
my @newbuildrequires;

# add modules data to provides
for (@{$modules || []}) {
$distprovides{$_} = $_;
$distprovides{"$1-*"} = $_ if /^(.*)-/;
}

my %brmap;
for my $br (@$buildrequires) {
my ($n, @v) = split(':', $br);
Expand Down Expand Up @@ -166,6 +172,7 @@ sub tostream {
my ($n, @v) = split(':', $_);
$newdeps->{'buildrequires'}->{$n} = \@v;
}
last;
}
die("could not select dependency block\n") unless $newdeps;
$md->{'dependencies'} = [ $newdeps ];
Expand Down

0 comments on commit b5ebbc2

Please sign in to comment.