Subject: Re: pkgsrc and update
To: None <jmarin@embedtronics.fi>
From: Havard Eidnes <he@uninett.no>
List: netbsd-users
Date: 07/24/2005 23:55:05
> I have, say, 6-month-old packages installed on my system.  One day, I=

> decide I want to update, say, xine-ui.
>
> What (on earth) should I do?
>
> I tried "make update" (although I know it does NOT work - and it didn=
't)
> and sooner or later, the system complains "xxx is already installed -=

> perhaps an older version?" - why doesn't it _update_ the package as I=

> told it to do?

The problem is that when pkgsrc tries to install (new) dependent
packages, it does "make install", not "make update" in those packages.
I think there is a way to instruct the pkgsrc machinery to do "make
update" also for the dependent packages, but why this isn't the
default for "make update" is, frankly, beyond me.  Exactly what the
incantation is, you'll have some pkgsrc infrastructure-savvy folks
tell you -- I'm not it.

> So, HOW do I update installed packages without first removing all
> packages and then installing everything from scratch.

Well, one semi-safe way I've found is to use pkgdepgraph to
compute what needs to be rebuilt, and in what order, and then use
the output of "pkgdepgraph -D" and "pkgdepgraph -R" to rebuild
stuff.  By default this will update all packages where new
versions are available, there's probably ways to make it do this
for a subset of the packages.

When I want to minimize downtime, I instead do a bulk build (in my
case of all packages...) of binary packages in a chroot setup, and use
the output of "pkgdepgraph -A" instead of "pkgdepgraph -R".  The
output of "pkgdepgraph -R" can probably be used in the chroot setup
instead of doing a full build.

Regards,

- H=E5vard