Check for derivation before creating build products.

It happens that we receive build succeeded notifications for derivations that
are not stored in the Builds table. In that case, do not try to create build
products.

* src/cuirass/base.scm (handle-build-event): Check if the derivation is
registered in the Builds table.
This commit is contained in:
Mathieu Othacehe 2020-06-26 10:27:50 +02:00
parent 300f6253f6
commit 91204db33a
No known key found for this signature in database
GPG Key ID: 8354763531769CA6
1 changed files with 4 additions and 3 deletions

View File

@ -577,9 +577,10 @@ updating the database accordingly."
(if (valid? drv)
(begin
(log-message "build succeeded: '~a'" drv)
(when spec
(create-build-outputs (db-get-build drv)
(assq-ref spec #:build-outputs)))
(let ((build (db-get-build drv)))
(when (and spec build)
(create-build-outputs build
(assq-ref spec #:build-outputs))))
(db-update-build-status! drv (build-status succeeded))
(for-each (match-lambda