Sometimes it's a pain to have to install the package before one can build it..
The trouble is that both the @srcdir and the @cwd produce '-C [dir]' to be added to the 'tar' command list
I see several possible fixes..
Another alternative: stop trying to use a separate 'tar' program. The attached is a functional alpha of "libtarfile", which provides a pretty clean API for building and reading tar archives (complete with gzip or bzip2 compression). In particular, this could be incorporated into pkg_create to address both of the problems you described:
* Remove the need to install a package before creating the package file. In particular, using this library, you can separate the filename written into the library from the file used as a source of data. * Remove problems with building 'tar' command lines.
On the read side, this library eliminates most of tar's historic limitations (by supporting 'pax extended' format archives and a couple of extensions used by GNU tar and star). These extensions have not yet been fully implemented for writing archives, though I do plan to implement the 'pax extended' format. (The hooks are all in place; I'm just missing a few hundred lines of code.)
The source code includes a very minimal standalone tar program. If anyone is interested in trying to complete it, please let me know.
I am working on a complete replacement for pkg_add using this library. So far, it's working pretty well, though I'm now looking at some complicated issues of package management, version control, and the like. I have some ideas for handling these issues, but there's still a lot of code to be written.
Updating pkg_create should be much simpler, though it's not something I'll be able to look into for quite a while. Again, if someone would like to use this library to improve pkg_create, let me know. (In particular, this will encourage me to find time to polish the write support.)
Feedback much appreciated,
Tim Kientzle
libtarfile-0.1.tgz
Description: Binary data
_______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"