$packs{$_} ||= "$_.$arch" for @{$packs_arch{$arch} || []};
}
-for my $pack (keys %packs) {
- my $r = {};
- my (@s, $s, @pr, @re);
- @s = split(' ', $prov{$packs{$pack}});
- while (@s) {
- $s = shift @s;
- next if $s =~ /^\//;
- if ($s =~ /^rpmlib\(/) {
- splice(@s, 0, 2);
- next;
- }
- push @pr, $s;
- splice(@s, 0, 2) if @s && $s[0] =~ /^[<=>]/;
- }
- @s = split(' ', $req{$packs{$pack}});
- while (@s) {
- $s = shift @s;
- next if $s =~ /^\//;
- if ($s =~ /^rpmlib\(/) {
- splice(@s, 0, 2);
- next;
- }
- push @re, $s;
- splice(@s, 0, 2) if @s && $s[0] =~ /^[<=>]/;
- }
- $r->{'provides'} = \@pr;
- $r->{'requires'} = \@re;
- $repo{$pack} = $r;
-}
-
if (!defined($dist) || $dist eq '') {
my $rpmarch = (grep {$fn{"rpm.$_"}} @archs)[0];
if (!$rpmarch) {
my $cf = Build::read_config_dist($dist, $archs[0], $configdir);
$cf->{'warnings'} = 1;
+my $dofileprovides = %{$cf->{'fileprovides'}};
+
+for my $pack (keys %packs) {
+ my $r = {};
+ my (@s, $s, @pr, @re);
+ @s = split(' ', $prov{$packs{$pack}});
+ while (@s) {
+ $s = shift @s;
+ next if !$dofileprovides && $s =~ /^\//;
+ if ($s =~ /^rpmlib\(/) {
+ splice(@s, 0, 2);
+ next;
+ }
+ push @pr, $s;
+ splice(@s, 0, 2) if @s && $s[0] =~ /^[<=>]/;
+ }
+ @s = split(' ', $req{$packs{$pack}});
+ while (@s) {
+ $s = shift @s;
+ next if !$dofileprovides && $s =~ /^\//;
+ if ($s =~ /^rpmlib\(/) {
+ splice(@s, 0, 2);
+ next;
+ }
+ push @re, $s;
+ splice(@s, 0, 2) if @s && $s[0] =~ /^[<=>]/;
+ }
+ $r->{'provides'} = \@pr;
+ $r->{'requires'} = \@re;
+ $repo{$pack} = $r;
+}
+
+
#######################################################################
sub print_rpmlist