From f17ffcc3577014c89d5c4d1009d06ff0e3dabba4 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 7 Mar 2023 13:20:13 +0300 Subject: Print unbuilt configurations for archived package tenants --- mod/mod-builds.cxx | 29 ++++++++--------------------- mod/mod-package-version-details.cxx | 6 ------ 2 files changed, 8 insertions(+), 27 deletions(-) diff --git a/mod/mod-builds.cxx b/mod/mod-builds.cxx index 6b5c90f..b0ff61a 100644 --- a/mod/mod-builds.cxx +++ b/mod/mod-builds.cxx @@ -138,8 +138,7 @@ template static inline query build_query (const brep::vector* config_ids, const brep::params::builds& params, - const brep::optional& tenant, - const brep::optional& archived) + const brep::optional& tenant) { using namespace brep; using query = query; @@ -150,9 +149,6 @@ build_query (const brep::vector* config_ids, query q (tenant ? pid.tenant == *tenant : !qt::private_); - if (archived) - q = q && qt::archived == *archived; - if (config_ids != nullptr) { query sq (false); @@ -279,8 +275,7 @@ build_query (const brep::vector* config_ids, template static inline query package_query (const brep::params::builds& params, - const brep::optional& tenant, - const brep::optional& archived) + const brep::optional& tenant) { using namespace brep; using query = query; @@ -289,9 +284,6 @@ package_query (const brep::params::builds& params, query q (tenant ? qp::id.tenant == *tenant : !qt::private_); - if (archived) - q = q && qt::archived == *archived; - // Note that there is no error reported if the filter parameters parsing // fails. Instead, it is considered that no packages match such a query. // @@ -546,8 +538,7 @@ handle (request& rq, response& rs) using query = query; using prep_query = prepared_query; - query q (build_query ( - &conf_ids, params, tn, nullopt /* archived */)); + query q (build_query (&conf_ids, params, tn)); // Specify the portion. Note that we will be querying builds in chunks, // not to hold locks for too long. @@ -835,8 +826,7 @@ handle (request& rq, response& rs) size_t npos (0); size_t ncur = build_db_->query_value ( - build_query ( - &conf_ids, bld_params, tn, false /* archived */)); + build_query (&conf_ids, bld_params, tn)); // From now we will be using specific values for the below filters for // each build database query. Note that the toolchain is the only @@ -878,8 +868,7 @@ handle (request& rq, response& rs) // build_query (nullptr /* config_ids */, bld_params, - tn, - false /* archived */)); + tn)); prep_bld_query bld_prep_query ( build_db_->prepare_query ( @@ -894,7 +883,7 @@ handle (request& rq, response& rs) // be easy as the cached values depend on the filter form parameters. // query q ( - package_query (params, tn, false /* archived */)); + package_query (params, tn)); for (auto& bp: build_db_->query (q)) { @@ -965,8 +954,7 @@ handle (request& rq, response& rs) using pkg_query = query; using prep_pkg_query = prepared_query; - pkg_query pq ( - package_query (params, tn, false /* archived */)); + pkg_query pq (package_query (params, tn)); // Specify the portion. Note that we will still be querying packages in // chunks, not to hold locks for too long. For each package we will query @@ -1004,8 +992,7 @@ handle (request& rq, response& rs) // via the build package id, we still need to pass the // tenant not to erroneously filter out the private tenants. // - build_query ( - &conf_ids, bld_params, tn, false /* archived */)); + build_query (&conf_ids, bld_params, tn)); prep_bld_query bld_prep_query ( conn->prepare_query ("mod-builds-build-query", bq)); diff --git a/mod/mod-package-version-details.cxx b/mod/mod-package-version-details.cxx index b5d733b..3a6ef1f 100644 --- a/mod/mod-package-version-details.cxx +++ b/mod/mod-package-version-details.cxx @@ -547,13 +547,7 @@ handle (request& rq, response& rs) // Query toolchains seen for the package tenant to produce a list of the // unbuilt configuration/toolchain combinations. // - // Note that it only make sense to print those unbuilt configurations that - // may still be built. That's why we leave the toolchains list empty if - // the package tenant is achieved. - // vector> toolchains; - - if (!tn->archived) { using query = query; -- cgit v1.1