From 37af85f5b084c234a350235690eb944984567e78 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 7 Jul 2023 14:08:34 +0300 Subject: Add odb sections to build_package class --- mod/mod-builds.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mod/mod-builds.cxx') diff --git a/mod/mod-builds.cxx b/mod/mod-builds.cxx index bad13c1..0c9e57a 100644 --- a/mod/mod-builds.cxx +++ b/mod/mod-builds.cxx @@ -624,6 +624,8 @@ handle (request& rq, response& rs) continue; } + build_db_->load (*p, p->constraints_section); + if (!exclude (*pc, p->builds, p->constraints, *i->second)) { if (skip != 0) @@ -891,6 +893,8 @@ handle (request& rq, response& rs) shared_ptr p (build_db_->load (id)); + // Note: load the constrains section lazily. + // for (const build_package_config& c: p->configs) { // Filter by package config name. @@ -899,6 +903,9 @@ handle (request& rq, response& rs) { for (const auto& tc: target_configs) { + if (!p->constraints_section.loaded ()) + build_db_->load (*p, p->constraints_section); + if (exclude (c, p->builds, p->constraints, *tc)) { target = tc->target; @@ -1031,6 +1038,8 @@ handle (request& rq, response& rs) // set unbuilt_configs; + // Load the constrains section lazily. + // for (const build_package_config& pc: bp->configs) { // Filter by package config name. @@ -1045,6 +1054,9 @@ handle (request& rq, response& rs) assert (i != target_conf_map_->end ()); + if (!bp->constraints_section.loaded ()) + build_db_->load (*bp, bp->constraints_section); + if (!exclude (pc, bp->builds, bp->constraints, *i->second)) unbuilt_configs.insert ( config_toolchain {ct.target, -- cgit v1.1