kfowler / xar

Automatically exported from code.google.com/p/xar
0 stars 0 forks source link

"--compression=bzip2" should yield an error if bzip2 is not supported #57

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
>>>>> What steps will reproduce the problem?

1a. Compile xar without the bzlib headers installed

    The ./configure output will contain

        checking bzlib.h usability... no
        checking bzlib.h presence... no
        checking for bzlib.h... no
        checking for BZ2_bzCompress in -lbz2... no

  but no error

1b. OR use the xar 1.5.1 included in Debian / Ubuntu, which does not
    support bzip2

3. Invoked with

        xar -c --compression=bzip2 -f TEST.xar

   xar silently disables compression, creating a big archive

>>>>> What is the expected output? What do you see instead?

I would expect xar to fail with an error "BZIP compression not supported
(disabled at compile time)", or at least give a warning "BZIP compression
not supported (disabled at compile time), using no compression"

>>>>> What version of the product are you using? On what operating system?

1.5.1, shipped with debian, and 1.5.2, compiled from source

>>>>> Please provide any additional information below.

I thing you should also give some warning at compile time, so that the
Debian package manager knows about the dependence and can decide to
provide bzlib.

Original issue reported on code.google.com by xovnlrcv...@spambog.de on 30 Jul 2008 at 12:43

GoogleCodeExporter commented 8 years ago
This should be fixed in r216, but only for bzip2.  The change still needs to be 
propagated to the lzma module.

Original comment by bbraun on 14 Aug 2008 at 6:06