On Mon, Oct 15, 2007 at 09:50:57PM -0500, Dan McGee wrote:
+ "xdelta patch %s/%s %s/%s-%s-%s.pkg.tar.gz %s/%s-%s-%s.pkg.tar.gz", + cachedir, d->filename, + cachedir, pkg->name, d->from, pkg->arch, + cachedir, pkg->name, d->to, pkg->arch); + _alpm_log(PM_LOG_DEBUG, _("command: %s\n"), command); + + printf("Generating %s-%s-%s.pkg.tar.gz with %s... ", + pkg->name, d->to, pkg->arch, d->filename); + if(system(command) == 0) {
I don't have much experience with this, so I'd like to have someone else chime in. Is system() the best call to be making, or should we do it another way (fork/exec like the scriptlets comes to mind).
Isn't the cleanest way to use xdelta api? For example, we use libarchive instead of bsdtar, libdownload instead of wget (even though there is the XferCommand trick), a md5 driver instead of md5sum command, etc However, it looks quite common in *nix to build little command line tools, and then a graphical gui on top of them, but I don't know how it's usually done (system or fork/exec or what). So I also hope someone can help :)