tar xf: failure/success

Cristian Ionescu-Idbohrn cristian.ionescu-idbohrn at axis.com
Thu Nov 14 09:16:46 UTC 2013

On Wed, 13 Nov 2013, Cristian Ionescu-Idbohrn wrote:
> Sometime between 1_19_4 and 1_20_2 tar extract changed behaviour.
> Invalid archive file (since 1_20_2) is successfuly ($?=0) expanded,
> although:
> 	tar: invalid magic
> 	tar: short read
> show up on stderr.

I should have probably mentioned that gnu-tar behaviour is to return
exit status failure in both cases.  Running the test-script in the
previous message (where bb-tar is replaced with gnu-tar) displays:

	$ ./tar_test.sh
	tar: This does not look like a tar archive
	tar: Exiting with failure status due to previous errors
	E: failed ($?=2) to extract tarball '../foo'

	gzip: stdin: unexpected end of file
	tar: Child returned status 1
	tar: Error is not recoverable: exiting now
	E: failed ($?=2) to decompress and extract tarbal '../foo'



More information about the busybox mailing list