diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2021-04-22 21:57:13 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2021-07-09 14:06:57 +0300 |
commit | 5d513688ae07d96910dd1eef83bdad4e9d780373 (patch) | |
tree | 402a87bbdb79a5a2392b714553e567465c3415c1 /bpkg/pkg-command.hxx | |
parent | 50a5c7b14250dab7941e8b0a67dfe6c442d2c5a9 (diff) |
Add support for linked configurations
Diffstat (limited to 'bpkg/pkg-command.hxx')
-rw-r--r-- | bpkg/pkg-command.hxx | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/bpkg/pkg-command.hxx b/bpkg/pkg-command.hxx index 40a55f2..0ed7072 100644 --- a/bpkg/pkg-command.hxx +++ b/bpkg/pkg-command.hxx @@ -20,6 +20,8 @@ namespace bpkg // The command can also be performed recursively for all or immediate // dependencies of the specified or all the held packages. // + // Note: loads selected packages. + // int pkg_command (const string& cmd, // Without the 'pkg-' prefix. const configuration_options&, @@ -33,15 +35,34 @@ namespace bpkg struct pkg_command_vars { + // Configuration information. + // + // Used to derive the package out_root directory, issue diagnostics, etc. + // + // Note that we cannot store the database reference here since it can be + // closed by the time this information is used. Instead, we save the + // required information. + // + dir_path config_orig; // Database's config_orig. + bool config_main; // True if database is main. + shared_ptr<selected_package> pkg; - strings vars; // Package-specific command line vars. + strings vars; // Package-specific command line vars. bool cwd; // Change the working directory to the package directory. + + // Return the selected package name/version followed by the configuration + // directory, unless this is the current configuration. For example: + // + // libfoo/1.1.0 + // libfoo/1.1.0 [cfg/] + // + std::string + string () const; }; void pkg_command (const string& cmd, - const dir_path& configuration, const common_options&, const string& cmd_variant, const strings& common_vars, |