Denys Vlasenko wrote:
On Tue, Jun 12, 2012 at 11:22 PM, John Spencer
<[email protected]> wrote:
whatever option i pass to unzip, it only shows me the usage...
Cannot reproduce:

I removed CONFIG_EXTRA_CFLAGS="-D__musl__ -static"
from your .config, build 1.20.1 and resulting busybox
does work for me:

$ ./busybox unzip cyassl-2.2.0.zip
Archive:  cyassl-2.2.0.zip
    creating: cyassl-2.2.0/
   inflating: cyassl-2.2.0/aclocal.m4
   inflating: cyassl-2.2.0/AUTHORS
    creating: cyassl-2.2.0/certs/
   inflating: cyassl-2.2.0/certs/ca-cert.pem
   inflating: cyassl-2.2.0/certs/ca-key.der
   inflating: cyassl-2.2.0/certs/ca-key.pem
   inflating: cyassl-2.2.0/certs/client-cert.der
   inflating: cyassl-2.2.0/certs/client-cert.pem
   inflating: cyassl-2.2.0/certs/client-ecc-cert.pem
....
....
   inflating: cyassl-2.2.0/testsuite/include.am
   inflating: cyassl-2.2.0/testsuite/testsuite-ntru.vcproj
   inflating: cyassl-2.2.0/testsuite/testsuite.c
   inflating: cyassl-2.2.0/testsuite/testsuite.sln
   inflating: cyassl-2.2.0/testsuite/testsuite.vcproj


Try not setting CONFIG_EXTRA_CFLAGS.

I think the complaint was that options did not work, not that the unzip function did not work. I tested various options with mixed results. With no options, unzip worked. Options that worked were -l, -p, -n, -o, -q. Options that failed and gave the help text were: -x, -d. Option -v is in the source code and works but is not in the usage text.

# busybox unzip -d burn burncdcc.zip
BusyBox v1.20.0.git (2011-09-29 11:36:21 EDT) multi-call binary.

Usage: unzip [-opts[modifiers]] FILE[.zip] [LIST] [-x XLIST] [-d DIR]

Extract files from ZIP archives

-l List archive contents (with -q for short form)
-n Never overwrite files (default)
-o Overwrite
-p Send output to stdout
-q Quiet
-x XLST Exclude these files
-d DIR Extract files into DIR

# busybox unzip -x BURNCDCC.EXE burncdcc.zip
BusyBox v1.20.0.git (2011-09-29 11:36:21 EDT) multi-call binary.

Usage: unzip [-opts[modifiers]] FILE[.zip] [LIST] [-x XLIST] [-d DIR]

Extract files from ZIP archives

-l List archive contents (with -q for short form)
-n Never overwrite files (default)
-o Overwrite
-p Send output to stdout
-q Quiet
-x XLST Exclude these files
-d DIR Extract files into DIR

The -x and -d options are not handled the same way by the switch statement as the others.

Doug Clapp

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to