On Fri, Mar 28, 2003 at 10:47:43PM -0800, Tim Kientzle wrote:
> 
> P.S.  It's galled me for a while that pkg_add has to fork 'tar' to
> extract the archive.  I've started piecing together a library that
> reads/writes tarfiles.  With this, it should be possible to make
> pkg_add considerably more efficient.  In particular, rather than
> extracting to a temp directory, then parsing important information,
> then moving the files, it should be possible using this library to
> read the initial entries ("+CONTENTS", in particular) directly into
> memory, process the information there, then extract the remainder of
> the package files directly into their final locations.  So far, I have
> a library API outlined, and functional read support implemented.  Next
> step is to hack up a minimal tar implementation that uses it to make
> sure everything's working correctly.
> 
> So far, the library automatically detects compression formats (using
> techniques like those in my pkg_install patch) and has some rough
> support for detecting the archive format as well.  (One goal of mine:
> support for 'pax extended archives', which I understand can handle
> ACLs.)
> 
> Of course, such a library could also form the basis for a BSD-licensed
> tar to replace GNU tar.  I understand a few people have wanted such a
> thing.

FYI, libtar[0] is BSD-licensed and might be useful to such a project.

[0] - http://www-dev.cites.uiuc.edu/libtar/

Brandon D. Valentine
-- 
[EMAIL PROTECTED]                                 http://www.geekpunk.net
Pseudo-Random Googlism:  valentine is a champion of the true small online
                         business
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to