tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg_add and remote packages



Aleksey Cheusov wrote:
One way to greatly simplify the code is to just fetch the package to
/var/tmp or whatever and install it afterwards like a local package.
This does increase the temporary space used, but as the next step in the
evolution will switch to inplace extraction, that is only temporary.
It also makes it easy to provide a local cache directory.
I vote for option for local caching _without_ inplace extraction
"evolution".  I personally dislike 'fetch to stdout | tar -xf-' way of
package installation I've found in BSD and Interix.

You may be misunderstanding what I wrote. What Joerg's proposal gets us to is:

* "local caching", meaning the remote package is fetched to the local host and stored on the file system.

* "in-place extraction", meaning the local package is extracted directly into ${LOCALBASE} and ${PKG_DBDIR} without using an intermediate directory to hold the contents of the "unpacked" package.

This isn't "fetch to stdout | tar -xf -".  It's more like:

    fetch to local_pkg.tgz
    cat local_pkg.tgz | ( cd /usr/pkg; tar -zxf - )

There's still two distinct steps, which should in the future allow for the "fetch" step to be done by something other than libfetch. The local package can be subject to various checks, e.g. checksums, signature verification, etc., before the second step of actually installing the package.

For comparison, IIRC, what currently happens is:

    fetch to stdout | ( cd /var/tmp/inst.XXXXXX; tar -zxf - )
    cd /var/tmp/inst.XXXXXX; tar -cf - * | ( cd /usr/pkg; tar -xf - )

        Cheers,

        -- Johnny C. Lam


Home | Main Index | Thread Index | Old Index