Re: [FILE] : Busybox ar command, to unpack debs
On Tue May 30, 2000 at 05:41:43AM +1000, bug1 wrote:
> The attached ar.c file can be included in busybox to enable "ar"
> archives to be unpacked.
> Seems debs are really ar.tar.gz we should now be able to unpack deb's
> from busybox alone.
>
> This is still pretty rough, all it does is accept the file to unpack as
> a paramater, it then lists the files details to the screen as it unpacks
> it to the current directory.
>
> It shouldnt break, but still lots of things to do to it, like check
> before overwriting file, extract to dir, list contents only etc, but
> this is just my first go.
>
> I created a function copySubFile(sourceFileDescriptor,
> destinationFiledescriptor, size) that coppies the specified amout of
> data from the current position of one filedescriptor to a second one, i
> thought something like this could be used as a common function, it could
> be used by ar, tar, cp_mv, maybe others i dont know.
>
> My c programming skills are(were) a bit rusty, so any feedback most
> welcome.
>
> Bloody segfaults took me ages to fix... mongrels !
>
>
> To try it you will have to link it to busybox manually, its 5am here,
> ill send a proper patch next time.
Cool. I'll give it a proper try tomorrow at work,
-Erik
--
Erik B. Andersen Web: http://www.xmission.com/~andersen/
email: andersee@debian.org
--This message was written using 73% post-consumer electrons--
Reply to: