From 22059500a799d788c09171e31b668ab8259ec057 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 17 Nov 2018 23:41:25 +0300 Subject: Add support for builds manifest value --- mod/mod-build-result.cxx | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'mod/mod-build-result.cxx') 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 bld; @@ -390,7 +397,11 @@ handle (request& rq, response&) build_db_->update (b); - bld = move (b); + shared_ptr p ( + build_db_->load (b->id.package)); + + if (belongs (*cfg, "all") && !exclude (*p, *cfg)) + bld = move (b); } } -- cgit v1.1