diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2021-06-22 22:04:52 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2021-07-01 16:38:54 +0300 |
commit | 441cd214f04b8738c3fd92dd3c1a8ad1f2e56ba8 (patch) | |
tree | 49727c21918e0ef74a7c7e367b6396073d61f9aa /bpkg/pkg-configure.hxx | |
parent | ede8a15c2e310b2ae30894dd640f58d87a8a9408 (diff) |
Add support for building dependency in other configuration and re-pointing dependents to it
Diffstat (limited to 'bpkg/pkg-configure.hxx')
-rw-r--r-- | bpkg/pkg-configure.hxx | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/bpkg/pkg-configure.hxx b/bpkg/pkg-configure.hxx index e9e64b6..2e2a495 100644 --- a/bpkg/pkg-configure.hxx +++ b/bpkg/pkg-configure.hxx @@ -20,6 +20,16 @@ namespace bpkg int pkg_configure (const pkg_configure_options&, cli::scanner& args); + // The custom search function, if specified, is called by pkg_configure() + // and pkg_configure_prerequisites() to obtain the database to search for + // the prerequisite in, instead of searching for it in the associated + // databases, recursively. If the function returns NULL, then fallback to + // the recursive search through the associated databases. + // + using find_prereq_database_function = database* (database&, + const package_name&, + bool buildtime); + // Note: all of the following functions expect the package dependency // constraints to be complete. @@ -32,7 +42,8 @@ namespace bpkg const shared_ptr<selected_package>&, const dependencies&, const strings& config_vars, - bool simulate); + bool simulate, + const function<find_prereq_database_function>& = {}); // Configure a system package and commit the transaction. // @@ -50,11 +61,13 @@ namespace bpkg // Note: loads selected packages. // package_prerequisites - pkg_configure_prerequisites (const common_options&, - database&, - transaction&, - const dependencies&, - const package_name&); + pkg_configure_prerequisites ( + const common_options&, + database&, + transaction&, + const dependencies&, + const package_name&, + const function<find_prereq_database_function>& = {}); } #endif // BPKG_PKG_CONFIGURE_HXX |