aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-build-result.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-11-17 23:41:25 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-11-29 20:53:58 +0300
commit22059500a799d788c09171e31b668ab8259ec057 (patch)
treeb6b6d31884a2f4d4226a7299c9decd388a426044 /mod/mod-build-result.cxx
parent2667fad8bf6e7ef6ef1894ab49a3bdc5cc858607 (diff)
Add support for builds manifest value
Diffstat (limited to 'mod/mod-build-result.cxx')
-rw-r--r--mod/mod-build-result.cxx23
1 files changed, 17 insertions, 6 deletions
diff --git a/mod/mod-build-result.cxx b/mod/mod-build-result.cxx
index 8b985be..177e67f 100644
--- a/mod/mod-build-result.cxx
+++ b/mod/mod-build-result.cxx
@@ -225,11 +225,17 @@ handle (request& rq, response&)
// Make sure the build configuration still exists.
//
- if (build_conf_map_->find (id.configuration.c_str ()) ==
- build_conf_map_->end ())
+ const bbot::build_config* cfg;
{
- warn_expired ("no build configuration");
- return true;
+ auto i (build_conf_map_->find (id.configuration.c_str ()));
+
+ if (i == build_conf_map_->end ())
+ {
+ warn_expired ("no build configuration");
+ return true;
+ }
+
+ cfg = i->second;
}
// Load the built package (if present).
@@ -261,7 +267,8 @@ handle (request& rq, response&)
// Load and update the package build configuration (if present).
//
// NULL if the package build doesn't exist or is not updated for any reason
- // (authentication failed, etc).
+ // (authentication failed, etc) or the configuration is excluded by the
+ // package.
//
shared_ptr<build> bld;
@@ -390,7 +397,11 @@ handle (request& rq, response&)
build_db_->update (b);
- bld = move (b);
+ shared_ptr<build_package> p (
+ build_db_->load<build_package> (b->id.package));
+
+ if (belongs (*cfg, "all") && !exclude (*p, *cfg))
+ bld = move (b);
}
}