[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/02: Handle system test derivations in create-small-backup
From: |
Christopher Baines |
Subject: |
01/02: Handle system test derivations in create-small-backup |
Date: |
Wed, 25 Mar 2020 14:27:26 -0400 (EDT) |
cbaines pushed a commit to branch master
in repository data-service.
commit b99854924aec961a57b518c1d4d2f0340fe77fb5
Author: Christopher Baines <address@hidden>
AuthorDate: Wed Mar 25 18:26:33 2020 +0000
Handle system test derivations in create-small-backup
Otherwise this table is empty.
---
scripts/guix-data-service-create-small-backup | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/scripts/guix-data-service-create-small-backup
b/scripts/guix-data-service-create-small-backup
index e5f5774..996b494 100755
--- a/scripts/guix-data-service-create-small-backup
+++ b/scripts/guix-data-service-create-small-backup
@@ -62,6 +62,17 @@ WHERE revision_id IN (
)
);
+CREATE UNLOGGED TABLE tmp_guix_revision_system_test_derivations AS
+SELECT *
+FROM guix_revision_system_test_derivations
+WHERE guix_revision_id IN (
+ SELECT id
+ FROM guix_revisions
+ WHERE commit IN (
+ SELECT commit FROM git_branches
+ )
+);
+
CREATE UNLOGGED TABLE tmp_package_derivations AS
SELECT * FROM package_derivations WHERE id IN (
SELECT package_derivation_id FROM tmp_guix_revision_package_derivations
@@ -69,7 +80,12 @@ SELECT * FROM package_derivations WHERE id IN (
CREATE UNLOGGED TABLE tmp_derivations AS
WITH RECURSIVE derivation_ids(id) AS (
- SELECT derivation_id FROM tmp_package_derivations
+ (
+ SELECT tmp_package_derivations.derivation_id FROM
tmp_package_derivations
+ UNION
+ SELECT tmp_guix_revision_system_test_derivations.derivation_id
+ FROM tmp_guix_revision_system_test_derivations
+ )
UNION
SELECT derivation_outputs.derivation_id
FROM derivation_ids
@@ -209,6 +225,9 @@ INSERT INTO package_derivations OVERRIDING SYSTEM VALUE
INSERT INTO guix_revision_package_derivations
SELECT * FROM tmp_guix_revision_package_derivations;
+INSERT INTO guix_revision_system_test_derivations
+ SELECT * FROM tmp_guix_revision_system_test_derivations;
+
INSERT INTO builds OVERRIDING SYSTEM VALUE
SELECT * FROM tmp_builds;