[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#32879] [PATCH] database: Add builds only if one of their outputs is
From: |
Ludovic Courtès |
Subject: |
[bug#32879] [PATCH] database: Add builds only if one of their outputs is new. |
Date: |
Sun, 30 Sep 2018 21:34:12 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Hello Clément,
Clément Lassieur <address@hidden> skribis:
> * Makefile.am (dist_sql_DATA): Add 'src/sql/upgrade-4.sql'.
> * src/cuirass/database.scm (db-add-output): New procedure.
> (db-add-build): Call DB-ADD-OUTPUT, rollback the transaction and return #f if
> DB-ADD-OUTPUT returned an empty list.
> * src/schema.sql (Outputs): Set 'path' as primary key, instead of 'derivation,
> name'.
> * src/sql/upgrade-4.sql: New file with SQL queries to upgrade the database.
> * tests/database.scm (make-dummy-build): Use the #:OUTPUTS key. Get default
> OUTPUTS to depend on DRV.
> ("db-add-build-with-fixed-output"): New test.
What’s the rationale? I suppose having a simpler primary key for
‘Outputs’ might help performance?
Thank you,
Ludo’.