diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-03-13 22:57:21 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-03-13 22:57:21 +0100 |
commit | 1a8ea0a1885ca5fff85eb00fc79d6c6bcd47818a (patch) | |
tree | 20d06beeef7e47fed57a51c9b10ee880a0e16ecf | |
parent | 3c0e6e6080242656104143612ba57bc210779709 (diff) |
offload: Fix 'choose-build-machine' for several machines.
* guix/scripts/offload.scm (choose-build-machine)[undecorate]: Turn into
a two-argument procedure.
-rw-r--r-- | guix/scripts/offload.scm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm index c9ea457db1..95e35088a1 100644 --- a/guix/scripts/offload.scm +++ b/guix/scripts/offload.scm @@ -466,10 +466,14 @@ allowed on MACHINE." machines)) (define (undecorate pred) - (match-lambda - ((machine slot) - (and (pred machine) - (list machine slot))))) + (lambda (a b) + (match a + ((machine1 slot1) + (match b + ((machine2 slot2) + (if (pred machine1 machine2) + (list machine1 slot1) + (list machine2 slot2)))))))) (let ((machines+slots (sort machines+slots (undecorate machine-less-loaded-or-faster?)))) |