Subject: Re: 'make update' question
To: None <tech-pkg@NetBSD.org>
From: James K. Lowden <jklowden@schemamania.org>
List: tech-pkg
Date: 07/18/2004 23:52:12
On Fri, 16 Jul 2004 08:16:14 -0400, Brian Hechinger <wonko@4amlunch.net>
wrote:
> is there any particular reason that the package is deinstalled before
> the build process starts?  would it be possible that the order is
> changed to, get new source, build, deinstall old pkg, install new pkg?

There is a particular reason.  

When a package builds, it relies on /usr/pkg/include and /usr/pkg/lib
(typically).  Almost every package either depends on or is depended on by
another; that's pretty much the reason pkgsrc exists.  So, saying "I'll
build package X outside the tree" (or without deinstalling the current
version) quickly loses meaning if it needs package Y, because where should
package Y go, and what should become of package Y, version n-1?  

The big answer is pkgviews.  A smaller answer is building your packages in
a chroot jail, cf. pkg_comp.  A still smaller answer is what I'm trying,
which is fooling with the various pkgsrc environment variables such that
pkgsrc builds/installs in an unusual place.  I then use a few symlinks
that make /usr/pkg etc. point to the newly built tree.  That basically
works, but you have to do some hacking, and it leaves you wandering among
the heretics.  ;-)

--jkl