From 57e0d73c776ef672afe2a20b1f7b39a495894c4a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 17 Sep 2009 13:51:04 +0000 Subject: [PATCH] * build-remote.pl: allow the system type to be a comma-separated list of system types. Don't treat the x86_64-linux system type specially. --- scripts/build-remote.pl.in | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/build-remote.pl.in b/scripts/build-remote.pl.in index 258272f7ba..25dadb5de7 100755 --- a/scripts/build-remote.pl.in +++ b/scripts/build-remote.pl.in @@ -62,7 +62,7 @@ while () { /^\s*(\S+)\s+(\S+)\s+(\S+)\s+(\d+)\s*$/ or die; push @machines, { hostName => $1 - , systemType => $2 + , systemTypes => [split(/,/, $2)] , sshKeys => $3 , maxJobs => $4 }; @@ -82,16 +82,15 @@ my $rightType = 0; my $machine; my $slotLock; LOOP: foreach my $cur (@machines) { - if ($neededSystem eq $cur->{systemType} - || ($neededSystem eq "i686-linux" && $cur->{systemType} eq "x86_64-linux")) - { + print STDERR @{$cur->{systemTypes}}, "\n"; + if (grep { $neededSystem eq $_ } @{$cur->{systemTypes}}) { $rightType = 1; # We have a machine of the right type. Try to get a lock on # one of the machine's lock files. my $slot = 0; while ($slot < $cur->{maxJobs}) { - my $slotLockFn = "$currentLoad/" . $cur->{systemType} . "-" . $cur->{hostName} . "-$slot"; + my $slotLockFn = "$currentLoad/" . (join '+', @{$cur->{systemTypes}}) . "-" . $cur->{hostName} . "-$slot"; $slotLock = new IO::Handle; open $slotLock, ">>$slotLockFn" or die; if (flock($slotLock, LOCK_EX | LOCK_NB)) {