aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@gmail.com>2016-01-23 18:33:00 +0000
committerPascal Terjan <pterjan@gmail.com>2016-01-23 18:33:00 +0000
commit9e5158caa8a406cd58a592b5d8bb201bb2bb358c (patch)
treefffebbffa972eda5be3edfaa8ec0be64d5af6e0f
parent863e628c20f4fd89d5d2a7ea28a4c24f74008c8f (diff)
downloadiurt-9e5158caa8a406cd58a592b5d8bb201bb2bb358c.tar
iurt-9e5158caa8a406cd58a592b5d8bb201bb2bb358c.tar.gz
iurt-9e5158caa8a406cd58a592b5d8bb201bb2bb358c.tar.bz2
iurt-9e5158caa8a406cd58a592b5d8bb201bb2bb358c.tar.xz
iurt-9e5158caa8a406cd58a592b5d8bb201bb2bb358c.zip
Modify one less global variable in the tree callbacks
-rwxr-xr-xulri23
1 files changed, 14 insertions, 9 deletions
diff --git a/ulri b/ulri
index 148479c..120b4b0 100755
--- a/ulri
+++ b/ulri
@@ -217,10 +217,6 @@ my $reject = "$config->{queue}/reject";
plog('MSG', "check uploads tree");
-# A list of what is currently building so we can report at the end
-#
-my %build_list;
-
plog('DEBUG', "input queue is $todo");
sub todo_func {
@@ -250,10 +246,6 @@ sub todo_func {
$arch = $config->{arch_translation}{$arch} if $config->{arch_translation}{$arch};
plog('DEBUG', "found lock on $host/$arch for $prefix");
- # Only for build status reporting
- #
- push @{$build_list{"$host/$arch"}}, $prefix;
-
if ($arch =~ /noarch/) {
plog('DEBUG', "... and $prefix is noarch");
$pkg_tree{$prefix}{media}{$media}{arch}{noarch} = 1;
@@ -746,9 +738,22 @@ foreach my $prefix (sort keys %pkg_tree) {
plog('MSG', "Current status");
+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}}) {
+ my $host = $bot->{host};
+ my $arch = $bot->{arch};
+ push @{$build_list{"$host/$arch"}}, $prefix;
+ }
+ }
+}
+
if (keys %build_list) {
plog('INFO', "currently building:");
- map { plog('INFO', " $_: " . join('', @{$build_list{$_}})) } keys %build_list;
+ map { plog('INFO', " $_: " . join('', @{$build_list{$_}})) } sort keys %build_list;
}
plog('INFO', "jobs in queue:", %to_compile ?