[BusyBox] Unarchive applets; new code overview
Glenn McGrath
bug1 at optushome.com.au
Fri Jun 15 06:58:52 UTC 2001
Laurence Anderson wrote:
>On the subject of passes, you can only really have one, as pipes don't
>allow seeking, and as people do something like [gzip -dc | tar xvf -] lots
>and even the unrpm script in busybox uses pipes to cpio.
>
Hmm, yea your right it does have to be done in one pass.
Im going to have to reorganise things now, should just be able to change
the get_*_headers to only read one entry at a time, and loop from the
calling applet.
>
>I think we do need a cpio applet (only really extract) as we have rpm2cpio
>in busybox, but no cpio! My applet is only 3.3k - with your patch it will
>probably be less. However most of the code should be in libbb, as a future
>RPM applet may need to call it to extract the cpio archive. The untar
>applet is a good idea, but can't you copy in the code from tar.c to support
>creating archives?
>
Ive been tryingto further integrate with other functions, but this isnt
an improvment on your patch, it is a bit smaller, but it is doing 2
passes (so cant get archive from stdin) and hard links are broken...
attached anyway.
It adds 2.8kB to a default build, or 1.6kB if ar or untar were selected.
Glenn
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cpio.c
Url: http://lists.busybox.net/pipermail/busybox/attachments/20010615/e1f6db99/attachment.diff
More information about the busybox
mailing list