From 5d513688ae07d96910dd1eef83bdad4e9d780373 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 22 Apr 2021 21:57:13 +0300 Subject: Add support for linked configurations --- bpkg/cfg-create.hxx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'bpkg/cfg-create.hxx') diff --git a/bpkg/cfg-create.hxx b/bpkg/cfg-create.hxx index 9831160..b861732 100644 --- a/bpkg/cfg-create.hxx +++ b/bpkg/cfg-create.hxx @@ -5,6 +5,7 @@ #define BPKG_CFG_CREATE_HXX #include +#include // configuration #include #include @@ -14,6 +15,27 @@ namespace bpkg int cfg_create (const cfg_create_options&, cli::scanner& args); + // Create a new bpkg configuration, initialize its database (add self-link, + // root repository, etc), and return this configuration information. See + // bpkg-cfg-create(1) for arguments semantics. + // + // If there is a current transaction already open, then stash it before the + // database initialization and restore it afterwards (used to create private + // configuration on demand). + // + shared_ptr + cfg_create (const common_options&, + const dir_path&, + optional name, + string type, + const strings& mods, + const strings& vars, + bool existing, + bool wipe, + optional uid = nullopt, + const optional& host_config = nullopt, + const optional& build2_config = nullopt); + default_options_files options_files (const char* cmd, const cfg_create_options&, -- cgit v1.1