Subject: Re: Ports -> make upgrade
To: Axel Scheepers <axel@axel.truedestiny.net>
From: Johnny C. Lam <jlam@netbsd.org>
List: netbsd-users
Date: 02/25/2002 15:20:43
On Mon, Feb 25, 2002 at 10:44:52PM +0100, Axel Scheepers wrote:
> Let me explain:
> Suppose you want to upgrade say tcsh, you type make upgrade in the pkgsrc/shells
> /tsch dir and it starts deleting your current installed tcsh. Now imagine that
> the newly port can't be fetched, or even build correctly. That leaves you with
> no tsch installed, right?

The "update" target could be improved slightly in that it could ensure that all
of the distfiles are present and pass their checksums before pkg_deleting any
installed packages.  This wasn't possible before due to the way that the recursive
fetch operation was designed which led to unbelievably long fetch times (on the
order of several days) for complex packages with many dependencies.  I believe a
new recursive fetch algorithm is being (or has been, I can't remember) committed
that will fix this problem.

> So why not change it to do a plain make first, and continue whenever that
> succesfully completes? After a full make, a make install shouldn't cause any
> hard trouble.

The problem is that many packages install both libraries and programes, and due to
the way that the compiler/linker is executed, the build process often links programs
against installed libraries rather than the just-built, newer libraries.  "Buildlinked"
packages are immune to this problem and can be built while another version of the
package is installed, but the number of buildlinked packages in pkgsrc is still
relatively low.  Thus, to avoid this problem, we pkg_delete a package before building
a new one.

	Cheers,

	-- Johnny Lam <jlam@netbsd.org>