diff options
Diffstat (limited to 'bpkg/pkg-configure.hxx')
-rw-r--r-- | bpkg/pkg-configure.hxx | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/bpkg/pkg-configure.hxx b/bpkg/pkg-configure.hxx index b708df5..6d3a7c9 100644 --- a/bpkg/pkg-configure.hxx +++ b/bpkg/pkg-configure.hxx @@ -20,35 +20,53 @@ namespace bpkg int pkg_configure (const pkg_configure_options&, cli::scanner& args); + // The custom search function. If specified, it 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 linked databases, + // recursively. If the function returns NULL, then fallback to the recursive + // search through the linked databases. + // + using find_database_function = database* (database&, + const package_name&, + bool buildtime); + // Note: all of the following functions expect the package dependency // constraints to be complete. // Configure the package, update its state, and commit the transaction. // void - pkg_configure (const dir_path& configuration, - const common_options&, + pkg_configure (const common_options&, + database&, transaction&, const shared_ptr<selected_package>&, const dependencies&, const strings& config_vars, - bool simulate); + bool simulate, + const function<find_database_function>& = {}); // Configure a system package and commit the transaction. // shared_ptr<selected_package> - pkg_configure_system (const package_name&, const version&, transaction&); + pkg_configure_system (const package_name&, + const version&, + database&, + transaction&); // Return package prerequisites given its dependencies. Fail if some of the // prerequisites are not configured or don't satisfy the package's // dependency constraints. Note that the package argument is used for // diagnostics only. // + // Note: loads selected packages. + // package_prerequisites pkg_configure_prerequisites (const common_options&, + database&, transaction&, const dependencies&, - const package_name&); + const package_name&, + const function<find_database_function>& = {}); } #endif // BPKG_PKG_CONFIGURE_HXX |