diff options
author | Mathieu Lirzin <mthl@gnu.org> | 2017-01-09 01:29:48 +0100 |
---|---|---|
committer | Mathieu Lirzin <mthl@gnu.org> | 2017-01-09 10:55:58 +0100 |
commit | d0a5801e397335bb44d8033e5deddf02c1cc99c2 (patch) | |
tree | 4ee6b183a21bdfb5f8fc8f7df71abc52878c9b68 | |
parent | 8988070725b113cfdea14113335f966b114da0a5 (diff) | |
download | cuirass-d0a5801e397335bb44d8033e5deddf02c1cc99c2.tar cuirass-d0a5801e397335bb44d8033e5deddf02c1cc99c2.tar.gz |
database: db-add-derivation: Don't try to add a derivation twice.
This fixes the issue of having multiple identical derivations associated with
an evaluation as reported by Ludovic Courtès <ludo@gnu.org> at
<https://lists.gnu.org/archive/html/guix-devel/2017-01/msg00109.html>.
* src/cuirass/database.scm (db-add-derivation): Ignore if JOB is already
present in DB.
-rw-r--r-- | src/cuirass/database.scm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm index 870cdc0..91133c2 100644 --- a/src/cuirass/database.scm +++ b/src/cuirass/database.scm @@ -1,5 +1,5 @@ ;;; database.scm -- store evaluation and build results -;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org> +;;; Copyright © 2016, 2017 Mathieu Lirzin <mthl@gnu.org> ;;; ;;; This file is part of Cuirass. ;;; @@ -147,7 +147,7 @@ INSERT OR IGNORE INTO Specifications (repo_name, url, load_path, file, \ (define (db-add-derivation db job) "Store a derivation result in database DB and return its ID." (sqlite-exec db "\ -INSERT INTO Derivations (derivation, job_name, evaluation)\ +INSERT OR IGNORE INTO Derivations (derivation, job_name, evaluation)\ VALUES ('~A', '~A', '~A');" (assq-ref job #:derivation) (assq-ref job #:job-name) |