From 614893088f691c74b562272edec90ef9bd54e230 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 11 Apr 2023 20:34:08 +0300 Subject: Re-arrange pkg-configure.hxx so function descriptions make more sense --- bpkg/pkg-configure.hxx | 49 +++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/bpkg/pkg-configure.hxx b/bpkg/pkg-configure.hxx index 119da64..a7409b9 100644 --- a/bpkg/pkg-configure.hxx +++ b/bpkg/pkg-configure.hxx @@ -39,7 +39,14 @@ namespace bpkg const package_name&, bool buildtime); - // Configure the package, update its state, and commit the transaction. + // Given dependencies of a package, return its prerequisite packages, + // configuration variables that resulted from selection of these + // prerequisites (import, reflection, etc), and sources of the configuration + // variables resulted from evaluating the reflect clauses. See + // pkg_configure() for the semantics of the dependency list. Fail if for + // some of the dependency alternative lists there is no satisfactory + // alternative (all its dependencies are configured, satisfy the respective + // constraints, etc). // // The package dependency constraints are expected to be complete. // @@ -58,29 +65,6 @@ namespace bpkg // dependency decisions" mode). Failed that, select an alternative as if no // prerequisites are specified (the "make dependency decisions" mode). // - void - pkg_configure (const common_options&, - database&, - transaction&, - const shared_ptr&, - const dependencies&, - const vector* alternatives, - package_skeleton&&, - const vector* prev_prerequisites, - bool disfigured, - bool simulate, - const function& = {}); - - - // Given dependencies of a package, return its prerequisite packages, - // configuration variables that resulted from selection of these - // prerequisites (import, reflection, etc), and sources of the configuration - // variables resulted from evaluating the reflect clauses. See - // pkg_configure() for the semantics of the dependency list. Fail if for - // some of the dependency alternative lists there is no satisfactory - // alternative (all its dependencies are configured, satisfy the respective - // constraints, etc). - // struct configure_prerequisites_result { package_prerequisites prerequisites; @@ -116,6 +100,8 @@ namespace bpkg const function&, const function&); + // Configure the package, update its state, and commit the transaction. + // void pkg_configure (const common_options&, database&, @@ -124,6 +110,21 @@ namespace bpkg configure_prerequisites_result&&, bool disfigured, bool simulate); + + // Note: loads selected packages. + // + void + pkg_configure (const common_options&, + database&, + transaction&, + const shared_ptr&, + const dependencies&, + const vector* alternatives, + package_skeleton&&, + const vector* prev_prerequisites, + bool disfigured, + bool simulate, + const function& = {}); } #endif // BPKG_PKG_CONFIGURE_HXX -- cgit v1.1