diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-08-14 10:00:29 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-08-14 15:09:11 +0200 |
commit | 24ad2ce7d070ae684159b6445981017dd7a40f8a (patch) | |
tree | 4eeea470fda336146fdbb92b993a6b0da84d734c /src/other_tools/utils/archive_ops.hpp | |
parent | 26fe1ac82a8437b292e5c17e791c02d5a6813a26 (diff) | |
download | justbuild-24ad2ce7d070ae684159b6445981017dd7a40f8a.tar.gz |
ArchiveOps: Add proper autodetection option for tarballs
We shouldn't exclude the possibility of receiving uncompressed
tarballs as repositories in just-mr. Therefore, we introduce an
explicit type that performs the autodetection (default behaviour
in just-mr). This is done to also be more in line with our
implementation which allows the granular handling of various
archive types (currently used only for testing purposes).
Diffstat (limited to 'src/other_tools/utils/archive_ops.hpp')
-rw-r--r-- | src/other_tools/utils/archive_ops.hpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/other_tools/utils/archive_ops.hpp b/src/other_tools/utils/archive_ops.hpp index 6ad5b7c4..74fcf39c 100644 --- a/src/other_tools/utils/archive_ops.hpp +++ b/src/other_tools/utils/archive_ops.hpp @@ -25,7 +25,14 @@ using archive = struct archive; using archive_entry = struct archive_entry; } -enum class ArchiveType : size_t { Zip, Tar, TarGz, TarBz2, TarXz }; +enum class ArchiveType : size_t { + Zip, + Tar, // uncompressed + TarGz, + TarBz2, + TarXz, + TarAuto, // autodetect tarball-type archives +}; /// \brief Class handling archiving and unarchiving operations via libarchive class ArchiveOps { |