+22
−4
Loading
When compressing a tar file, unless the `-t` option is passed, `pixz`
adds a data block to the end of the xz stream which contains an index of
the tar file contents. During decompression, `xz` assumes the data
block contains file data and appends the decompressed data to the output
file. This confuses pristine-xz, since there is no way to compress the
data+index such that it matches the original. To avoid this, use `pixz`
to decompress, when available.
When a pixz tar index is present (detected using `pixz -l`), skip
compression testing with `xz`, since we know it won't work. This saves
significant time for large archives.
Fixes: #859303
Signed-off-by:
Kevin Locke <kevin@kevinlocke.name>