diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cuirass/base.scm | 3 | ||||
-rw-r--r-- | src/cuirass/database.scm | 8 | ||||
-rw-r--r-- | src/schema.sql | 1 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/cuirass/base.scm b/src/cuirass/base.scm index baf8909..52e0d00 100644 --- a/src/cuirass/base.scm +++ b/src/cuirass/base.scm @@ -147,7 +147,8 @@ if required." (compile (string-append (%package-cachedir) "/" (assq-ref spec #:name))) (with-store store - (let ((jobs (evaluate store db spec))) + (let* ((spec* (acons #:current-commit commit spec)) + (jobs (evaluate store db spec*))) (set-build-options store #:use-substitutes? #f) (build-packages store db jobs)))) (db-add-stamp db spec commit))) diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm index b831833..2d2dfd2 100644 --- a/src/cuirass/database.scm +++ b/src/cuirass/database.scm @@ -155,9 +155,11 @@ INSERT INTO Derivations (derivation, job_name, evaluation)\ "Retrieve a job in database DB which corresponds to ID." (car (sqlite-exec db "SELECT * FROM Derivations WHERE derivation='~A';" id))) -(define (db-add-evaluation db spec-id) - (sqlite-exec db "INSERT INTO Evaluations (specification) VALUES ('~A');" - spec-id) +(define (db-add-evaluation db eval) + (sqlite-exec db "\ +INSERT INTO Evaluations (specification, revision) VALUES ('~A', '~A');" + (assq-ref eval #:specification) + (assq-ref eval #:revision)) (last-insert-rowid db)) (define-syntax-rule (with-database db body ...) diff --git a/src/schema.sql b/src/schema.sql index 725d145..a545da5 100644 --- a/src/schema.sql +++ b/src/schema.sql @@ -23,6 +23,7 @@ CREATE TABLE Stamps ( CREATE TABLE Evaluations ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, specification INTEGER NOT NULL, + revision TEXT NOT NULL, FOREIGN KEY (specification) REFERENCES Specifications (id) ); |