Skip to content

Commit

Permalink
[backend] report SCCs in the builddepinfo query
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Sep 17, 2021
1 parent 5afbbf8 commit a543431
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/backend/BSXML.pm
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,9 @@ our $builddepinfo = [
[[ 'cycle' =>
[ 'package' ],
]],
[[ 'scc' =>
[ 'package' ],
]],
];

our $event = [
Expand Down
6 changes: 6 additions & 0 deletions src/backend/bs_repserver
Original file line number Diff line number Diff line change
Expand Up @@ -3384,6 +3384,12 @@ sub getbuilddepinfo {
my @cycles = map {{'package' => $_}} @{$depends->{'cycles'} || []};
my $res = { 'package' => \@res, };
$res->{'cycle'} = \@cycles if @cycles;
if (@{$depends->{'sccs'} || []}) {
my @sccs = @{$depends->{'sccs'} || []};
@$_ = sort @$_ for @sccs;
@sccs = sort {$a->[0] cmp $b->[0]} @sccs;
$res->{'sccs'} = [ map {{'package' => $_}} @sccs ];
}
return ($res, $BSXML::builddepinfo);
}

Expand Down

0 comments on commit a543431

Please sign in to comment.