diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-12-07 23:12:05 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-12-11 14:05:48 +0300 |
commit | 294c558d577cd4acb2ee8e94e0dfd6acdb946c6c (patch) | |
tree | 02742141dad6cf91040eb48eca54b718dee8ad55 /mod/mod-package-version-details.cxx | |
parent | 7dabb6e931740b2777be5dca53c3cec0b984f0fb (diff) |
Add support for build configuration class inheritance
Diffstat (limited to 'mod/mod-package-version-details.cxx')
-rw-r--r-- | mod/mod-package-version-details.cxx | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/mod/mod-package-version-details.cxx b/mod/mod-package-version-details.cxx index 9566c8f..cbe338e 100644 --- a/mod/mod-package-version-details.cxx +++ b/mod/mod-package-version-details.cxx @@ -34,6 +34,7 @@ using namespace brep::cli; brep::package_version_details:: package_version_details (const package_version_details& r) : database_module (r), + build_config_module (r), options_ (r.initialized_ ? r.options_ : nullptr) { } @@ -46,13 +47,17 @@ init (scanner& s) options_ = make_shared<options::package_version_details> ( s, unknown_mode::fail, unknown_mode::fail); - database_module::init (*options_, options_->package_db_retry ()); + database_module::init (static_cast<options::package_db> (*options_), + options_->package_db_retry ()); if (options_->build_config_specified ()) - database_module::init (static_cast<options::build> (*options_), - static_cast<options::build_db> (*options_), + { + database_module::init (static_cast<options::build_db> (*options_), options_->build_db_retry ()); + build_config_module::init (static_cast<options::build> (*options_)); + } + if (options_->root ().empty ()) options_->root (dir_path ("/")); } @@ -393,9 +398,10 @@ handle (request& rq, response& rs) s << H3 << "Builds" << ~H3 << DIV(ID="builds"); - auto exclude = [&pkg] (const build_config& cfg, string* reason = nullptr) + auto exclude = [&pkg, this] (const build_config& cfg, + string* reason = nullptr) { - return brep::exclude (pkg->builds, pkg->build_constraints, cfg, reason); + return this->exclude (pkg->builds, pkg->build_constraints, cfg, reason); }; timestamp now (system_clock::now ()); |