[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: Fix more things for the systems table introductio
From: |
Christopher Baines |
Subject: |
branch master updated: Fix more things for the systems table introduction |
Date: |
Fri, 23 Apr 2021 18:11:21 -0400 |
This is an automated email from the git hooks/post-receive script.
cbaines pushed a commit to branch master
in repository data-service.
The following commit(s) were added to refs/heads/master by this push:
new 1f078e1 Fix more things for the systems table introduction
1f078e1 is described below
commit 1f078e1af0e3e08e3fef52dec9897977b6416a28
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Fri Apr 23 23:10:28 2021 +0100
Fix more things for the systems table introduction
---
guix-data-service/builds.scm | 10 +++++++---
guix-data-service/comparison.scm | 10 +++++++---
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/guix-data-service/builds.scm b/guix-data-service/builds.scm
index ba93958..2fe31ce 100644
--- a/guix-data-service/builds.scm
+++ b/guix-data-service/builds.scm
@@ -572,12 +572,14 @@ WHERE derivation_output_details_set_id NOT IN (
) AND derivation_output_details_set_id IN (
SELECT derivation_output_details_set_id
FROM package_derivations
+ INNER JOIN systems
+ ON package_derivations.system_id = systems.id
INNER JOIN derivations_by_output_details_set
ON package_derivations.derivation_id =
derivations_by_output_details_set.derivation_id
INNER JOIN build_servers_build_config
ON build_servers_build_config.build_server_id = $1
- AND build_servers_build_config.system = package_derivations.system
+ AND build_servers_build_config.system = systems.system
AND build_servers_build_config.target = package_derivations.target
"
(if (null? revision-commits)
@@ -623,12 +625,14 @@ WHERE NOT EXISTS (
) AND derivation_output_details_sets.id IN (
SELECT derivation_output_details_set_id
FROM package_derivations
+ INNER JOIN systems
+ ON package_derivations.system_id = systems.id
INNER JOIN derivations_by_output_details_set
ON package_derivations.derivation_id =
derivations_by_output_details_set.derivation_id
INNER JOIN build_servers_build_config
ON build_servers_build_config.build_server_id = $1
- AND build_servers_build_config.system = package_derivations.system
+ AND build_servers_build_config.system = systems.system
AND build_servers_build_config.target = package_derivations.target
"
(if (null? revision-commits)
@@ -646,7 +650,7 @@ WHERE NOT EXISTS (
(if systems
(string-append
"
- AND package_derivations.system IN ("
+ AND systems.system IN ("
(string-join
(map quote-string systems)
",")
diff --git a/guix-data-service/comparison.scm b/guix-data-service/comparison.scm
index e5e1955..d40f8e6 100644
--- a/guix-data-service/comparison.scm
+++ b/guix-data-service/comparison.scm
@@ -264,7 +264,7 @@ GROUP BY derivation_source_files.store_path"))
(string-append
(if systems
(string-append
- " AND package_derivations.system IN ("
+ " AND systems.system IN ("
(string-join (map
(lambda (s)
(string-append "'" s "'"))
@@ -287,11 +287,13 @@ GROUP BY derivation_source_files.store_path"))
(string-append "
WITH base_packages AS (
SELECT packages.*, derivations.id AS derivation_id, derivations.file_name,
- package_derivations.system, package_derivations.target,
+ systems.system, package_derivations.target,
derivations_by_output_details_set.derivation_output_details_set_id
FROM packages
INNER JOIN package_derivations
ON packages.id = package_derivations.package_id
+ INNER JOIN systems
+ ON package_derivations.system_id = systems.id
INNER JOIN derivations
ON package_derivations.derivation_id = derivations.id
INNER JOIN derivations_by_output_details_set
@@ -303,11 +305,13 @@ WITH base_packages AS (
)" extra-constraints "
), target_packages AS (
SELECT packages.*, derivations.id AS derivation_id, derivations.file_name,
- package_derivations.system, package_derivations.target,
+ systems.system, package_derivations.target,
derivations_by_output_details_set.derivation_output_details_set_id
FROM packages
INNER JOIN package_derivations
ON packages.id = package_derivations.package_id
+ INNER JOIN systems
+ ON package_derivations.system_id = systems.id
INNER JOIN derivations
ON package_derivations.derivation_id = derivations.id
INNER JOIN derivations_by_output_details_set
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: Fix more things for the systems table introduction,
Christopher Baines <=