aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-builds.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'mod/mod-builds.cxx')
-rw-r--r--mod/mod-builds.cxx12
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,