diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-03-01 16:57:54 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-03-01 17:21:44 +0100 |
commit | ad577114dde4c86455262a35ad4b3838eb4a1453 (patch) | |
tree | fef78e32a2db0aa3e1cbb7dd411220e6d028c222 /src | |
parent | f083282fd3bf813fda0b54ed33278d2d5325dfa1 (diff) | |
download | cuirass-ad577114dde4c86455262a35ad4b3838eb4a1453.tar cuirass-ad577114dde4c86455262a35ad4b3838eb4a1453.tar.gz |
base: 'spawn-builds' correctly keeps track of remaining builds.
Fixes <https://bugs.gnu.org/30645>.
Reported by Andreas Enge <andreas@enge.fr>.
* src/cuirass/base.scm (spawn-builds): Fix TOTAL vs. COUNT mismatches.
Diffstat (limited to 'src')
-rw-r--r-- | src/cuirass/base.scm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cuirass/base.scm b/src/cuirass/base.scm index 3b1b463..8c6cd8c 100644 --- a/src/cuirass/base.scm +++ b/src/cuirass/base.scm @@ -368,7 +368,7 @@ MAX-BATCH-SIZE items." (define total (length jobs)) (log-message "building ~a derivations in batches of ~a" - (length jobs) max-batch-size) + total max-batch-size) ;; Shuffle jobs so that we don't build sequentially i686/x86_64/aarch64, ;; master/core-updates, etc., which would be suboptimal. @@ -377,7 +377,7 @@ MAX-BATCH-SIZE items." (if (zero? count) (log-message "done with ~a derivations" total) (let*-values (((batch rest) - (if (> total max-batch-size) + (if (> count max-batch-size) (split-at jobs max-batch-size) (values jobs '()))) ((drv) @@ -408,7 +408,7 @@ MAX-BATCH-SIZE items." ;; adjust DB here. (update-build-statuses! store db drv) - (loop rest (max (- total max-batch-size) 0)))))) + (loop rest (max (- count max-batch-size) 0)))))) (define* (handle-build-event db event) "Handle EVENT, a build event sexp as produced by 'build-event-output-port', |