# read dist if we can
my $cf;
if (defined($dist) && $dist ne '') {
- $cf = Build::read_config_dist($dist, $archs[0], $configdir);
+ $cf = Build::read_config_dist($dist, $archs[0] || 'noarch', $configdir);
$binarytype = $cf->{'binarytype'} if $cf->{'binarytype'} && $cf->{'binarytype'} ne 'UNDEFINED';
}
print STDERR "Warning: distribution not specified, assuming '$dist' (see $configdir).\n";
}
-$cf = Build::read_config_dist($dist, $archs[0], $configdir);
+$cf ||= Build::read_config_dist($dist, $archs[0] || 'noarch', $configdir);
$cf->{'warnings'} = 1;
my $dofileprovides = %{$cf->{'fileprovides'}};
}
} elsif (/^P:(.*?)-\d+\/\d+\/\d+: (.*)$/) {
$pkgP = $2;
- next if $prov{$1};
- $prov{$1} = $2
+ next if $prov{$1};
+ $prov{$1} = $2;
} elsif (/^R:(.*?)-\d+\/\d+\/\d+: (.*)$/) {
$pkgR = $2;
- next if $req{$1};
- $req{$1} = $2;
+ next if $req{$1};
+ $req{$1} = $2;
} elsif (/^C:(.*?)-\d+\/\d+\/\d+: (.*)$/) {
$pkgC = $2;
- next if $con{$1};
- $con{$1} = $2;
+ next if $con{$1};
+ $con{$1} = $2;
} elsif (/^O:(.*?)-\d+\/\d+\/\d+: (.*)$/) {
$pkgO = $2;
- next if $obs{$1};
- $obs{$1} = $2;
+ next if $obs{$1};
+ $obs{$1} = $2;
} elsif (/^r:(.*?)-\d+\/\d+\/\d+: (.*)$/) {
$pkgr = $2;
} elsif (/^s:(.*?)-\d+\/\d+\/\d+: (.*)$/) {
delete $rec{$i};
delete $con{$i};
delete $obs{$i};
- delete $rec{$i};
- delete $sup{$i};
+ delete $rec{$i};
+ delete $sup{$i};
$req{$i} = $pkgR if defined $pkgR;
$con{$i} = $pkgC if defined $pkgC;
$obs{$i} = $pkgO if defined $pkgO;
- $rec{$i} = $pkgr if defined $pkgr;
- $sup{$i} = $pkgs if defined $pkgs;
+ $rec{$i} = $pkgr if defined $pkgr;
+ $sup{$i} = $pkgs if defined $pkgs;
} else {
- next if $ids{$1};
- $ids{$1} = $2;
+ #also need to clean the below values.
+ undef $pkgF;
+ undef $pkgP;
+ undef $pkgR;
+ undef $pkgC;
+ undef $pkgO;
+ undef $pkgr;
+ undef $pkgs;
+ next if $ids{$1};
+ $ids{$1} = $2;
}
undef $pkgF;
undef $pkgP;
undef $pkgR;
undef $pkgC;
undef $pkgO;
- undef $pkgr;
- undef $pkgs;
+ undef $pkgr;
+ undef $pkgs;
} elsif ($_ eq 'D:') {
%packs_done = %ids;
}