Permalink
Browse files

[backend] also use project bininfo in receivekiwitree_scan

  • Loading branch information...
1 parent a356727 commit 37db00bb1ba42b8fd0b54cc51fd46b8ab54ee444 @mlschroe mlschroe committed Sep 6, 2012
Showing with 10 additions and 10 deletions.
  1. +10 −10 src/backend/bs_repserver
View
@@ -1422,21 +1422,21 @@ sub receivekiwitree_scan {
my ($buildinfo) = @_;
my %res;
- my %prpaps;
+ my %prpas;
for my $dep (@{$buildinfo->{'bdep'} || []}) {
next unless defined $dep->{'package'};
my $repoarch = $dep->{'repoarch'} || $buildinfo->{'arch'};
next if $repoarch eq 'src';
- $prpaps{"$dep->{'project'}/$dep->{'repository'}/$repoarch/$dep->{'package'}"} = 1;
+ $prpas{"$dep->{'project'}/$dep->{'repository'}/$repoarch"}->{$dep->{'package'}} = 1;
}
- for my $prpap (sort keys %prpaps) {
- my @bins = grep {/\.(?:$binsufsre)$/} ls("$reporoot/$prpap");
- @bins = filtersources(@bins) if -e "$reporoot/$prpap/.nosourceaccess";
- for my $bin (sort @bins) {
- my $leadsigmd5;
- eval { Build::queryhdrmd5("$reporoot/$prpap/$bin", \$leadsigmd5); };
- next if $@ || !$leadsigmd5;
- $res{$leadsigmd5} = "$prpap/$bin";
+ for my $prpa (sort keys %prpas) {
+ my $gbininfo = read_gbininfo("$reporoot/$prpa") || {};
+ for my $packid (sort keys %{$prpas{$prpa}}) {
+ my $bininfo = $gbininfo->{$packid} || read_bininfo("$reporoot/$prpa/$packid");
+ filtersources_bininfo($bininfo) if $bininfo->{'.nosourceaccess'};
+ for my $bin (values %$bininfo) {
+ $res{$bin->{'leadsigmd5'}} = "$prpa/$packid/$bin->{'filename'}" if $bin->{'leadsigmd5'};
+ }
}
}
return \%res;

0 comments on commit 37db00b

Please sign in to comment.