aboutsummaryrefslogtreecommitdiffstats
path: root/ulri
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2011-01-18 22:30:20 +0000
committerPascal Terjan <pterjan@mageia.org>2011-01-18 22:30:20 +0000
commit7728bb6cce66f37681177f5eb58d6a5f0141ec28 (patch)
tree08aa5e9f38638be06fd4ba540c449cf2831c1ebe /ulri
parent4efe58085dea53a3565b00e98e86a696f1f84467 (diff)
downloadiurt-7728bb6cce66f37681177f5eb58d6a5f0141ec28.tar
iurt-7728bb6cce66f37681177f5eb58d6a5f0141ec28.tar.gz
iurt-7728bb6cce66f37681177f5eb58d6a5f0141ec28.tar.bz2
iurt-7728bb6cce66f37681177f5eb58d6a5f0141ec28.tar.xz
iurt-7728bb6cce66f37681177f5eb58d6a5f0141ec28.zip
Have only one instance of the bot running per host at a time, even if they are building for different arch
Diffstat (limited to 'ulri')
-rwxr-xr-xulri12
1 files changed, 6 insertions, 6 deletions
diff --git a/ulri b/ulri
index bf59d3d..a466917 100755
--- a/ulri
+++ b/ulri
@@ -165,7 +165,6 @@ foreach my $k (keys %{$config->{arch_translation}}) {
$run{pidfile_home} = $config->{tmp};
$run{pidfile} = "upload";
-my $pidfile = check_pid(\%run);
#my $cache = init_cache(\%run, $config, { done => {} });
my $cache = { done => {} };
@@ -236,7 +235,7 @@ sub todo_func {
$arch =~ s/-.*//;
}
- $run{bot}{$arch}{$host}{$bot} = $prefix;
+ $run{bot}{$host}{$bot} = $prefix;
# this should be in the cache, but waiting for a cache-clean option
$compildone->{$prefix}{$arch} = 1;
@@ -294,6 +293,7 @@ check_upload_tree(\%run, $done, \&done_func,);
plog('MSG', "check build bot results");
+my $pidfile = check_pid(\%run);
my %later;
foreach my $prefix (keys %pkg_tree) {
my $ent = $pkg_tree{$prefix};
@@ -421,7 +421,7 @@ foreach my $prefix (keys %pkg_tree) {
plog('INFO', "delete lock file for $prefix");
unlink $lock_file;
- $run{bot}{$arch}{$host}{$bot} = 0;
+ $run{bot}{$host}{$bot} = 0;
if ($later) {
next bot;
@@ -538,6 +538,7 @@ foreach my $prefix (keys %pkg_tree) {
} # end bot
} # end prefix
+unlink $pidfile;
#
@@ -625,7 +626,7 @@ foreach my $prefix (sort keys %pkg_tree) {
foreach my $host (keys %{$config->{bot}{$arch}}) {
foreach my $bot (keys %{$config->{bot}{$arch}{$host}}) {
- next if $run{bot}{$arch}{$host}{$bot};
+ next if $run{bot}{$host}{$bot};
# Enable noarch lock after the first bot snarfs the package
#
@@ -633,7 +634,7 @@ foreach my $prefix (sort keys %pkg_tree) {
plog('INFO', "building on $host/$arch ($bot)");
- $run{bot}{$arch}{$host}{$bot} = $prefix;
+ $run{bot}{$host}{$bot} = $prefix;
$compildone->{$prefix}{$arch} = 1;
my $bot_conf = $config->{bot}{$arch}{$host}{$bot};
@@ -749,7 +750,6 @@ plog('INFO', "jobs in queue:", %to_compile ?
#dump_cache(\%run);
-unlink $pidfile;
exit();