diff options
author | 2022-12-22 03:39:39 +0000 | |
---|---|---|
committer | 2022-12-22 11:17:58 +0200 | |
commit | daf56c11e302c253368906ba468e4c368d611d4e (patch) | |
tree | 5e34f936c0d5143bb74371eb0292540a8e3d680a | |
parent | new release 0.10.4 (diff) | |
download | snakeoil-daf56c11e302c253368906ba468e4c368d611d4e.tar.gz snakeoil-daf56c11e302c253368906ba468e4c368d611d4e.tar.bz2 snakeoil-daf56c11e302c253368906ba468e4c368d611d4e.zip |
compression: prefer gtar over tar if available
Prefer 'gtar' over 'tar' if available, as we need GNU tar for
--use-compress-program.
With libarchive's tar, we get an 'unrecognized archive' error.
Signed-off-by: Sam James <sam@gentoo.org>
Closes: https://github.com/pkgcore/snakeoil/pull/93
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
-rw-r--r-- | src/snakeoil/compression/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/snakeoil/compression/__init__.py b/src/snakeoil/compression/__init__.py index 580a70a..77c0631 100644 --- a/src/snakeoil/compression/__init__.py +++ b/src/snakeoil/compression/__init__.py @@ -145,7 +145,7 @@ class _CompressedStdin: class _Tar(_Archive, ArComp): exts = frozenset(['.tar']) - binary = ('tar',) + binary = ('gtar', 'tar',) compress_binary = None default_unpack_cmd = '{binary} xf "{path}"' @@ -156,6 +156,7 @@ class _Tar(_Archive, ArComp): for b in self.compress_binary: try: process.find_binary(b[0]) + # FIXME: This is a gnuism, needs gnu tar. cmd += f' --use-compress-program="{" ".join(b)}"' break except process.CommandNotFound: |