tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Simple unzip(1) replacement



On Mon, Aug 24, 2009 at 10:45:03AM +0200, Joerg Sonnenberger wrote:
> in src/usr.bin/unzip there is a simple libarchive frontend emulating
> most of the infozip command line. Some of the major obscure features are
> missing (-T, -z, -b, -s, -C, -K, -M, -V, -W, -X, -$, -/, -:, only
> positive option forms). It should be good enough for pkgsrc and everyday
> usage though.

Now that it's enabled by default (sorry for not testing earlier) I
tried it out. The first three commands I tried were completely
different in both...

For comparison, here are the same steps with NetBSD unzip and infozip
unzip:

NetBSD unzip
# unzip -v arnold.zip
 Length   Method    Size  Ratio   Date   Time  CRC-32    Name
--------  ------  ------- -----   ----   ----  ------    ----
 4194304  Stored  4194304   0%  06-20-09 13:07 00000000  arnold.txt
--------          ------- ---                            -------
 4194304          4194304   0%                                   1 file
# unzip arnold.zip
x arnold.txt
# unzip arnold.zip
unzip: not implemented

# /usr/pkg/bin/unzip -v arnold.zip
Archive:  arnold.zip
 Length   Method    Size  Ratio   Date   Time   CRC-32    Name
--------  ------  ------- -----   ----   ----   ------    ----
 4194304  Defl:N  2611045  38%  06-20-09 13:07  2b666fed  arnold.txt
--------          -------  ---                            -------
 4194304          2611045  38%                            1 file
# /usr/pkg/bin/unzip arnold.zip
Archive:  arnold.zip
  inflating: arnold.txt
# /usr/pkg/bin/unzip arnold.zip
Archive:  arnold.zip
replace arnold.txt? [y]es, [n]o, [A]ll, [N]one, [r]ename:

a) The unzip -v output is wrong wrt compressed size, method, ratio,
   and CRC-32.
b) The unzip filename output is completely different.
c) The replacement question is not asked, instead one gets a
   confusing error message.
d) There's a tab too many in the summary line.


 Thomas


Home | Main Index | Thread Index | Old Index