Subject: package update/replace (was Re: pkg_install BIG problem)
To: Rene Hexel <>
From: Eric Haszlakiewicz <>
List: tech-pkg
Date: 12/11/2004 16:49:44
On Sat, Dec 11, 2004 at 12:35:59PM +1000, Rene Hexel wrote:
>   This may work for the top package (the one that you do a "make update"
> in), but how do you do this for dependent packages?  E.g., if glib is
> updated, then gtk+ and tons of gnome stuff depend on this.  Glib can, of
> course, be built first, but once it gets deinstalled (right before the
> install, in your scenario), a ton of other packages get (and need to
> get) deinstalled as well that have not been built yet.

	well, of course, but that's a different issue than keeping the
package you explicitly update installed until there's a known-good build.

>   The only solution I see is to get UPDATE_TARGET=replace to work
> properly.

	I don't know about setting UPDATE_TARGET, but I know running a
"make replace" seems to work fine for me.  What isn't right about it?

	However, you have to be careful while doing that because pkgsrc
doesn't know which versions are compatible.  e.g., if you try to install
package "libpng-1.2.7" pkgsrc doesn't know that it's ok for it to replace
an already installed "libpng-1.2.4" without rebuilding dependant packages.
It also doesn't know if a package happened to statically link the library.
	Those problems are solvable, but it's a lot of work.  Every package
would need to have added to it a value that says what is the earliest 
version of the package that can be transparently upgraded to the current
	Until they are solved, the best solution for minimizing down time is
probably to setup a chroot build environment to create updated binary
packages, and then install those using "pkg_add -uu".