From 5163436b00711318baea4fc0ad43a4de8222354a Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sun, 14 May 2017 00:37:16 +0300 Subject: Implement builds page --- mod/mod-build-task.cxx | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'mod/mod-build-task.cxx') diff --git a/mod/mod-build-task.cxx b/mod/mod-build-task.cxx index d75c73d..3e02463 100644 --- a/mod/mod-build-task.cxx +++ b/mod/mod-build-task.cxx @@ -7,6 +7,10 @@ #include #include +#include +#include +#include + #include // compare_c_string #include // path_match() #include @@ -15,9 +19,6 @@ #include #include -#include -#include - #include #include @@ -56,10 +57,22 @@ init (scanner& s) options_->package_db_retry ()); if (options_->build_config_specified ()) + { database_module::init (static_cast (*options_), static_cast (*options_), options_->build_db_retry ()); + // Check that the database 'build' schema matches the current one. It's + // enough to perform the check in just a single module implementation + // (more details in the comment in package_search::init()). + // + const string ds ("build"); + if (schema_catalog::current_version (*build_db_, ds) != + build_db_->schema_version (ds)) + fail << "database 'build' schema differs from the current one (module " + << BREP_VERSION_ID << ")"; + } + if (options_->root ().empty ()) options_->root (dir_path ("/")); } -- cgit v1.1