add support to libarchive
Your system information
- Steam client version:
- Distribution (e.g. Ubuntu): OpenMandriva Lx 3.0
- Opted into Steam client beta?: [Yes/No] Yes
- Have you checked for system updates?: [Yes/No] Yes
Please describe your issue in as much detail as possible:
Some systems uses libarchive (www.libarchive.org) as default tar program. In this case there are a lot of "tar'isms" in stream shell scripts, one of them is --checkpoint switch for tar. Would be nice if steam's shell scripts were aware of libarchive, and make use of it when detected.
Steps for reproducing this issue:
- Install/update Steam on system where libarchive is default tar implementation
- Steam fails to install/update
~~GNU-tar is always available as gtar even when it is not the default tar provider, so that can be used in scripts to avoid breakage.~~
gtar is not a thing on Gentoo Linux, I can't speak for other distros.
@Tele42 You are correct, I thought gtar was created by the upstream build, but it isn't, and hence, Gentoo doesn't have it. My mistake.
Not sure when this changed, but Gentoo has gtar now. Also on gentoo it is now possible to set libarchive (AKA bsdtar) as the default tar, so this can break some gentoo systems.
Regardless, it should be possible to just inspect tar --version and change behavior based on whether the string GNU tar is found or not.
Here is some really terrible, untested example code to do just that (placed in the public domain):
if which gtar && gtar --version | grep --silent --fixed-strings 'GNU tar'; then
# Override `tar` in case `tar` is a different implementation than GNU tar
alias tar=gtar
elif tar --version | grep --invert-match --silent --fixed-strings 'GNU tar'; then
echo 'GNU tar must be present as either gtar or tar.'
exit 1
fi
To be honest, the progress bar could just be dropped now. This takes a second or two on most systems these days.