From 84174a38a9b094c3a5cbef07a48b84b9c65d5bf8 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Sat, 23 Jan 2016 18:40:02 +0000 Subject: Do not modify $run in the tree callbacks --- ulri | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'ulri') diff --git a/ulri b/ulri index 120b4b0..b662232 100755 --- a/ulri +++ b/ulri @@ -252,8 +252,6 @@ sub todo_func { $arch =~ s/-.*//; } - $run{bot}{$host}{$bot} = $prefix; - # this should be in the cache, but waiting for a cache-clean option $pkg_tree{$prefix}{media}{$media}{arch}{$arch} = 1; @@ -309,6 +307,16 @@ check_upload_tree($todo, \&todo_func); # time as the src.rpm in the todo tree check_upload_tree($done, \&done_func); +# Load bot status + +foreach my $prefix (keys %pkg_tree) { + my $ent = $pkg_tree{$prefix}; + foreach my $media (keys %{$ent->{media}}) { + foreach my $bot (@{$ent->{media}{$media}{bot}}) { + $run{bot}{$bot->{host}}{$bot->{bot}} = $prefix; + } + } +} # # Part 1: get results from finished builds @@ -743,7 +751,7 @@ my %build_list; foreach my $prefix (keys %pkg_tree) { my $ent = $pkg_tree{$prefix}; foreach my $media (keys %{$ent->{media}}) { - foreach my $bot (keys %{$ent->{media}{$media}{bot}}) { + foreach my $bot (@{$ent->{media}{$media}{bot}}) { my $host = $bot->{host}; my $arch = $bot->{arch}; push @{$build_list{"$host/$arch"}}, $prefix; -- cgit v1.2.1