NetBSD-Users archive

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

Re: Muddled wrt pkgsrc



On Mon, Mar 10, 2014 at 04:17:53PM -0400, Greg Troxel wrote:
> 
>   Use pkg_rolling-replace (see the man page for details) which basically
>   does 'make replace' in the right order.  But it can't deal with some
>   situations involving renaming and moving files from one package to
>   another.  This is sort of like what you're asking for, except that it
>   freshens packages bottom up.
> 

I have had pkg_rolling-replace get into a circular depedency loop and
had to interrupt it when it was in the weeds.

> 
> A more complicated path is to change pkgsrc so that DEPENDS_TARGET will
> end up doing
> 

My even more complicated method is to set up a chroot with an install in
it, do some null mounts to mount in my pkgrsrc tree.  In the chroot I
blow away /usr/pkg and /var/pkg/db and then use a custom meta-package to
build everything I normally use.  I have:

PKG_SYSCONFBASE?=   /etc/pkg

in mk.conf so that the pkg related etc files go to /etc/pkg rather than
/usr/pkg/etc.  This way once the build is done I can mv aside my system
/usr/pkg and /var/pkg/db and copy the updated ones over which gives me
roll back to a working version if things go bad.  If the package I want
is not going to cause rebuilds of everything I can just build it in the
chroot with a "make package" and then run a pkg_add from within
/usr/pkgsrc/package/All - since I null mount my real pkgsrc the built
packages are there for pkg_add to install.  It takes a bit more disk
space to keep a chroot environment around and you have to remember to
keep it up to date but I have found the ease in doing the big package
updates well worth it.  Also, using chroot also means you can still use
your old packages while the new ones are being built.

-- 
Brett Lymn
Staple Guns: because duct tape doesn't make that KerCHUNK sound - xkcd.com


Home | Main Index | Thread Index | Old Index