[pacman-dev] [PATCH 3/4] Download delta files if UseDelta is set.
Aaron Griffin
aaronmgriffin at gmail.com
Thu Oct 18 02:34:30 EDT 2007
On 10/17/07, Xavier <shiningxc at gmail.com> wrote:
> 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
Technically yes, but I think in this case this is the only option
available - either xdelta has no API, or using it is like a few
hundred lines... I can't remember which
More information about the pacman-dev
mailing list