diff options
Diffstat (limited to 'bpkg/pkg-command.hxx')
-rw-r--r-- | bpkg/pkg-command.hxx | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/bpkg/pkg-command.hxx b/bpkg/pkg-command.hxx index 3196bb1..2de9b73 100644 --- a/bpkg/pkg-command.hxx +++ b/bpkg/pkg-command.hxx @@ -20,6 +20,12 @@ namespace bpkg // The command can also be performed recursively for all or immediate // dependencies of the specified or all the held packages. // + // If allow_host_type is false, then fail if the current configuration is of + // the host or build2 type. Also skip the build-time dependencies in the + // recursive mode in this case. + // + // Note: loads selected packages. + // int pkg_command (const string& cmd, // Without the 'pkg-' prefix. const configuration_options&, @@ -27,20 +33,41 @@ namespace bpkg bool recursive, bool immediate, bool all, + const strings& all_patterns, bool package_cwd, + bool allow_host_type, cli::group_scanner& args); 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, |