diff options
-rw-r--r-- | guix-data-service/builds.scm | 20 | ||||
-rw-r--r-- | guix-data-service/model/nar.scm | 5 |
2 files changed, 14 insertions, 11 deletions
diff --git a/guix-data-service/builds.scm b/guix-data-service/builds.scm index af6d681..fcd739c 100644 --- a/guix-data-service/builds.scm +++ b/guix-data-service/builds.scm @@ -337,10 +337,14 @@ WHERE derivation_output_details_set_id NOT IN ( FROM package_derivations INNER JOIN derivations_by_output_details_set ON package_derivations.derivation_id = - derivations_by_output_details_set.derivation_id" - (if (null? revision-commits) - " - WHERE" + 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.target = package_derivations.target +" + (if (null? revision-commits) + "" (string-append " INNER JOIN guix_revision_package_derivations @@ -350,12 +354,8 @@ WHERE derivation_output_details_set_id NOT IN ( ON guix_revisions.id = guix_revision_package_derivations.revision_id WHERE guix_revisions.commit IN (" (string-join (map quote-string revision-commits) ",") - ") - AND")) - " - -- TODO: Filter better on what systems and targets build servers use - package_derivations.system = 'x86_64-linux' - AND package_derivations.target = 'x86_64-linux' + ")")) + " ) ORDER BY derivation_output_details_set_id, derivations.id LIMIT 15000")) diff --git a/guix-data-service/model/nar.scm b/guix-data-service/model/nar.scm index bf222da..7a724fb 100644 --- a/guix-data-service/model/nar.scm +++ b/guix-data-service/model/nar.scm @@ -322,7 +322,6 @@ WHERE derivation_output_details.path NOT IN ( ON narinfo_signature_data.id = narinfo_fetch_records.narinfo_signature_data_id WHERE narinfo_fetch_records.build_server_id = $1 ) - AND derivations.system = 'x86_64-linux' " (if (null? guix-revision-commits) "" @@ -332,6 +331,10 @@ WHERE derivation_output_details.path NOT IN ( -- Select outputs that are in the relevant revisions SELECT derivation_id FROM package_derivations + 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.target = package_derivations.target INNER JOIN guix_revision_package_derivations ON guix_revision_package_derivations.package_derivation_id = package_derivations.id INNER JOIN guix_revisions |