aboutsummaryrefslogtreecommitdiffstats
path: root/ulri
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@gmail.com>2016-01-23 16:16:59 +0000
committerPascal Terjan <pterjan@gmail.com>2016-01-23 16:16:59 +0000
commit2669674bcbc7ed911fb2d4aa8311ad131bb0d6b8 (patch)
tree55b206ebf5d02367902b3cf5f6457538c428d8b6 /ulri
parent15fee06a85406c5f2e60fd927c22147031b3e68f (diff)
downloadiurt-2669674bcbc7ed911fb2d4aa8311ad131bb0d6b8.tar
iurt-2669674bcbc7ed911fb2d4aa8311ad131bb0d6b8.tar.gz
iurt-2669674bcbc7ed911fb2d4aa8311ad131bb0d6b8.tar.bz2
iurt-2669674bcbc7ed911fb2d4aa8311ad131bb0d6b8.tar.xz
iurt-2669674bcbc7ed911fb2d4aa8311ad131bb0d6b8.zip
Store packages for which the build is in progress or done in pkg_tree
Diffstat (limited to 'ulri')
-rwxr-xr-xulri25
1 files changed, 12 insertions, 13 deletions
diff --git a/ulri b/ulri
index 0fc586e..ae81ed1 100755
--- a/ulri
+++ b/ulri
@@ -205,7 +205,6 @@ if ($df->{per} == 100) {
($fulldate, $daydate) = get_date();
my %pkg_tree;
-my $compildone = {};
my $todo = "$config->{queue}/todo";
my $failure = "$config->{queue}/failure";
@@ -257,14 +256,14 @@ sub todo_func {
if ($arch =~ /noarch/) {
plog('DEBUG', "... and $prefix is noarch");
- $compildone->{$prefix}{$media}{noarch} = 1;
+ $pkg_tree{$prefix}{media}{$media}{arch}{noarch} = 1;
$arch =~ s/-.*//;
}
$run{bot}{$host}{$bot} = $prefix;
# this should be in the cache, but waiting for a cache-clean option
- $compildone->{$prefix}{$media}{$arch} = 1;
+ $pkg_tree{$prefix}{media}{$media}{arch}{$arch} = 1;
my $time = read_line("$todo/$f/$m/$s/$r");
$time = (split ' ', $time)[2];
@@ -295,7 +294,7 @@ sub done_func {
if ($r =~ /(\d{14}\.\w+\.\w+\.\d+)_(.*)\.(done|fail|excluded)$/) {
my ($prefix, $arch) = ($1, $2);
$arch = $config->{arch_translation}{$arch} if $config->{arch_translation}{$arch};
- $compildone->{$prefix}{$media}{$arch} = 1;
+ $pkg_tree{$prefix}{media}{$media}{arch}{$arch} = 1;
} elsif ($r =~ /(\d{14}\.\w+\.\w+\.\d+)_(.*\.([^.]+)\.rpm)$/) {
my ($prefix, $rpm) = ($1, $2);
plog('DEBUG', "found already built rpm $rpm ($prefix)");
@@ -473,7 +472,7 @@ foreach my $prefix (keys %pkg_tree) {
if (!$ended && !$fail) {
plog('FAIL', "$bot timed out on $host/$arch ($seconds sec) or " .
"it's dead (status $proc_state), removing lock");
- $compildone->{$prefix}{$media}{$arch} = 0;
+ $pkg_tree{$prefix}{media}{$media}{arch}{$arch} = 0;
next bot;
}
@@ -494,7 +493,7 @@ foreach my $prefix (keys %pkg_tree) {
if (sget($remote, "$prefix_dir/*", "$fail_dir/$prefix")) {
plog('ERROR', "copying from $host:$prefix_dir/ " .
"to $fail_dir/ failed ($!)");
- $compildone->{$prefix}{$media}{$arch} = 0;
+ $pkg_tree{$prefix}{media}{$media}{arch}{$arch} = 0;
}
cleanup_failed_build($todo_dir, $done_dir, $fail_dir, $prefix, $ent, $arch, $config);
@@ -588,8 +587,8 @@ foreach my $prefix (sort keys %pkg_tree) {
# Skip this arch if package is already building as noarch or for this arch
#
- next if $compildone->{$prefix}{$media}{noarch};
- next if $compildone->{$prefix}{$media}{$arch};
+ next if $pkg_tree{$prefix}{media}{$media}{arch}{noarch};
+ next if $pkg_tree{$prefix}{media}{$media}{arch}{$arch};
# If all packages in a group are noarch, consider the entire group
# as noarch
@@ -648,8 +647,8 @@ foreach my $prefix (sort keys %pkg_tree) {
# Register that the package is building
$run{bot}{$host}{$bot} = $prefix;
- $compildone->{$prefix}{$media}{$arch} = 1;
- $compildone->{$prefix}{$media}{noarch} = 1 if $noarch;
+ $pkg_tree{$prefix}{media}{$media}{arch}{$arch} = 1;
+ $pkg_tree{$prefix}{media}{$media}{arch}{noarch} = 1 if $noarch;
# spawn remote build bot and save output on local file
# (remove status.log before building, otherwise we can have
@@ -730,15 +729,15 @@ foreach my $prefix (sort keys %pkg_tree) {
last;
}
- last if $compildone->{$prefix}{$media}{$arch};
- last if $compildone->{$prefix}{$media}{noarch};
+ last if $pkg_tree{$prefix}{media}{$media}{arch}{$arch};
+ last if $pkg_tree{$prefix}{media}{$media}{arch}{noarch};
}
# Count packages to compile for each architecture. Count noarch
# package only once.
#
$arch = 'noarch' if $noarch;
- unless ($compildone->{$prefix}{$media}{$arch}) {
+ unless ($pkg_tree{$prefix}{media}{$media}{arch}{$arch}) {
$to_compile{$arch}++ if !($noarch && $noarch_countflag);
}
$noarch_countflag = 1 if $noarch;