diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-05-22 13:26:33 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-05-22 13:26:33 +0200 |
commit | 1373e460b426d5adf3a304a60cd8f3634aface45 (patch) | |
tree | d11466b3f641510d351a6ce57ec9c131dd9ce47d /bpkg/archive.hxx | |
parent | 4fd96434dd9afca5f446275fd037e28a09c85edd (diff) |
Unify package archive extraction cases to use common implementation
Diffstat (limited to 'bpkg/archive.hxx')
-rw-r--r-- | bpkg/archive.hxx | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/bpkg/archive.hxx b/bpkg/archive.hxx index c646185..d5f9390 100644 --- a/bpkg/archive.hxx +++ b/bpkg/archive.hxx @@ -19,14 +19,21 @@ namespace bpkg dir_path package_dir (const path& archive); - // Start the process of extracting the specified file from the archive. If - // diag is false, then redirect stderr to /dev/null (this can be used, for - // example, to suppress diagnostics). Note that in this case process errors - // (like unable to start) are still printed. + // Start the process of extracting the archive to the specified directory. + // + pair<process, process> + start_extract (const common_options&, + const path& archive, + const dir_path&); + + // Start the process of extracting the specified file from the archive to + // the process' stdout. If diag is false, then redirect stderr to /dev/null + // (this can be used, for example, to suppress diagnostics). Note that in + // this case process errors (like unable to start) are still reported. // // Return a pair of processes that form a pipe. Wait on the second first. // - pair<butl::process, butl::process> + pair<process, process> start_extract (const common_options&, const path& archive, const path& file, |