my @cleaned : shared = ();
my @errors :shared;
my @expansion_errors = ();
+my @tmp_expansion_errors = ();
my $packages_built :shared = 0;
my %workers = ();
sub update_pkgdeps()
{
- @expansion_errors = ();
+ @tmp_expansion_errors = ();
foreach my $name (keys %to_build) {
if(! (grep $_ eq $name, @skipped)) {
my $fn = $to_build{$name}->{filename};
if (!shift @bdeps ) {
debug("expansion error");
debug(" $_") for @bdeps;
- push @expansion_errors, $name;
+ push @tmp_expansion_errors, $name;
next;
}
my @deps;
last;
}
+ # No candidate packges and all thread works are idle, and pkgdeps
+ # is updated, in this case, set packages in @tmp_expansion_errors
+ # as real expansion_errors, and all packages depend on these packages
+ # can not be blocked.
+ if (@order == 0 && threads->list() == 0 && $dirty == 0) {
+ foreach my $pkg (@tmp_expansion_errors) {
+ push @expansion_errors, $pkg if (! (grep $_ eq $pkg, @expansion_errors));
+ }
+ }
+
if (@order == 0) {
# Waiting thread workers done, then re-calculate ready packages
sleep(1);