Skip to content
This repository
Browse code

[backend] also use project bininfo in receivekiwitree_scan

  • Loading branch information...
commit 37db00bb1ba42b8fd0b54cc51fd46b8ab54ee444 1 parent a356727
Michael Schroeder mlschroe authored

Showing 1 changed file with 10 additions and 10 deletions. Show diff stats Hide diff stats

  1. +10 10 src/backend/bs_repserver
20 src/backend/bs_repserver
@@ -1422,21 +1422,21 @@ sub receivekiwitree_scan {
1422 1422 my ($buildinfo) = @_;
1423 1423
1424 1424 my %res;
1425   - my %prpaps;
  1425 + my %prpas;
1426 1426 for my $dep (@{$buildinfo->{'bdep'} || []}) {
1427 1427 next unless defined $dep->{'package'};
1428 1428 my $repoarch = $dep->{'repoarch'} || $buildinfo->{'arch'};
1429 1429 next if $repoarch eq 'src';
1430   - $prpaps{"$dep->{'project'}/$dep->{'repository'}/$repoarch/$dep->{'package'}"} = 1;
  1430 + $prpas{"$dep->{'project'}/$dep->{'repository'}/$repoarch"}->{$dep->{'package'}} = 1;
1431 1431 }
1432   - for my $prpap (sort keys %prpaps) {
1433   - my @bins = grep {/\.(?:$binsufsre)$/} ls("$reporoot/$prpap");
1434   - @bins = filtersources(@bins) if -e "$reporoot/$prpap/.nosourceaccess";
1435   - for my $bin (sort @bins) {
1436   - my $leadsigmd5;
1437   - eval { Build::queryhdrmd5("$reporoot/$prpap/$bin", \$leadsigmd5); };
1438   - next if $@ || !$leadsigmd5;
1439   - $res{$leadsigmd5} = "$prpap/$bin";
  1432 + for my $prpa (sort keys %prpas) {
  1433 + my $gbininfo = read_gbininfo("$reporoot/$prpa") || {};
  1434 + for my $packid (sort keys %{$prpas{$prpa}}) {
  1435 + my $bininfo = $gbininfo->{$packid} || read_bininfo("$reporoot/$prpa/$packid");
  1436 + filtersources_bininfo($bininfo) if $bininfo->{'.nosourceaccess'};
  1437 + for my $bin (values %$bininfo) {
  1438 + $res{$bin->{'leadsigmd5'}} = "$prpa/$packid/$bin->{'filename'}" if $bin->{'leadsigmd5'};
  1439 + }
1440 1440 }
1441 1441 }
1442 1442 return \%res;

0 comments on commit 37db00b

Please sign in to comment.
Something went wrong with that request. Please try again.