Closed TheChymera closed 2 years ago
Disabled feature temporarily: https://github.com/TheChymera/mkstage4/commit/df3d89d5a265a9c30e7d4484fc3d84c410dc5deb
Hi there. So, as discussed, the simplest solution is to remove the quotes and replace the array subscript @ with * for --use-compress-prog
when constructing the TAR_OPTIONS
array. So the full code would look something like this:
COMP_OPTIONS=("${COMPRESS_AVAILABLE[$COMPRESS_TYPE]}")
if [[ "${COMPRESS_AVAILABLE[$COMPRESS_TYPE]}" == *"/xz" ]]
then
COMP_OPTIONS+=( "-T0" )
fi
# Generic tar options:
TAR_OPTIONS=(
-cpP
--ignore-failed-read
--xattrs-include='*.*'
--numeric-owner
--use-compress-prog="${COMP_OPTIONS[*]}"
)
Hope this helps!
@ppw0 should be fixed as of https://github.com/TheChymera/mkstage4/commit/8099ec1c8b540c745180a429601e6adcf45c77dc — feel free to reopen or comment if this is not the case. And thanks for your help!
Technically it should work: https://www.gnu.org/software/tar/manual/html_section/Compression.html but it does now.
Other workarounds such as double quotes or using argument shorthands without the equal sign also fail to work.
One fix might be to re-write the logic to use
export XZ_DEFAULTS="-T 0"
and leverage theJ
argument of tar (more here).bug initially reported by ppw, informally.