diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2023-07-07 14:08:34 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2023-07-07 15:19:59 +0300 |
commit | 37af85f5b084c234a350235690eb944984567e78 (patch) | |
tree | 8a63a39711e9831e456ebdc1f783c10053805865 /mod/mod-builds.cxx | |
parent | b125c5f1ca398d4c912ecfba3bf451bfa63b6293 (diff) |
Add odb sections to build_package class
Diffstat (limited to 'mod/mod-builds.cxx')
-rw-r--r-- | mod/mod-builds.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
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<build_package> p (build_db_->load<build_package> (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<config_toolchain> 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, |