Subject: Re: pkgsrc update procedures
To: Sascha Retzki <lantis@askarali.info>
From: Dave B <spam@pianocast.net>
List: netbsd-users
Date: 03/25/2005 12:50:57
On Thu, Mar 24, 2005 at 06:00:44PM +0100, Sascha Retzki wrote:
...
> You should really build it all in a, I think the right term is "sandbox", and
> just update the real system if nothing fails.
...

  I sometimes use a chroot'ed environment to build packages, via

    pkgsrc/mk/bulk/mksandbox

to do what you've described.  It has its own /usr/pkg, but most every-
thing else is null-mounted (mostly read-only) from the main environ-
ment (including, e.g., src/ & pkgsrc/).  Then I build packages via

    make update UPDATE_TARGET=bin-install

while having

    BINPKG_SITES=

in /etc/mk.conf.  This will use binary packages from on your machine,
if they're already built; or create them from source, otherwise.  Once
a build succeeds, you now have a new package binary available in both
the main environment and the sandbox (due to mksandbox's shared mount-
ing scheme) under pkgsrc/packages/All--without ever having had to
deinstall any existing package from the main environment.

  I don't know how this method compares to pkg_comp, but maybe it's an
option for you if you're interested.

Cheers,  --Dave