Greetings.

I'm using TAR_OPTIONS with GNU tar 1.29 to set my preferred compression
program:

$ export TAR_OPTIONS="--use-compress-program=lbzip2"

However, doing so seems to break the -a (--auto-compress) option:

$ tar -x -a -v -f foo.tar.bz2   
tar (child): laN\a\306\320U: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

Some observations:

* The problem seems to happens only when --use-compress-program is
  invoked via $TAR_OPTIONS.  If I pass it on the command line, or don't
  pass it at all (that is, neither on the command line nor via
  $TAR_OPTIONS) then everything works fine.

* Specifying -j instead of -a also works in any case.

* The problem happens to matter what value is passed to
  --use-compress-program.  (That is, this isn't a problem with lbzip2.)

I suspect this is a bug but would be happy to be corrected.

Full steps to reproduce, showing what works and what doesn't:

$ touch 'This works fine'
$ export TAR_OPTIONS=
$ tar -c -j -v -f foo.tar.bz2 'This works fine'
This works fine
$ tar -x -a -v -f foo.tar.bz2
This works fine
$ tar --use-compress-program=lbzip2 -x -a -v -f foo.tar.bz2
This works fine
$ export TAR_OPTIONS="--use-compress-program=lbzip2"
$ tar -x -j -v -f foo.tar.bz2
This works fine
$ tar -x -a -v -f foo.tar.bz2
tar (child): la\256\233\350\267U: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

Regards,
Tristan

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
                  Tristan Miller
Free Software developer, ferret herder, logologist
             https://logological.org/
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Attachment: pgpi2Ygu6_y60.pgp
Description: OpenPGP digital signature

Reply via email to