Subject: RE: Apropos package upgrading.
To: Dave Burgess <firstname.lastname@example.org>
From: Frederick Bruckman <email@example.com>
Date: 03/19/2001 17:49:35
On Mon, 19 Mar 2001, Dave Burgess wrote:
> I have been upgrading the servers from 1.4.3 to 1.5 (with the attendant
> upgrades from a.out to ELF) by hand for the past month and a half; I am
> almost through. The toughest part of the problem is that I don't want to
> waste time recompiling the same program over and over from a 'make update'.
"make update" is completely the wrong way to go with this, in my opinion.
> If a compiled package is up to date, I wish there was some way the make
> program could recognize that and not recompile it. If the package has been
> updated, I want the program to recognize that and recompile it, otherwise if
> I want the package deleted, I'll 'make clean' it.
You can't do that. Let's say you're updating a package which depends
on both "png" and "gettext" and others, which all need to be updated.
Any package built against either the updated gettext or the updated
png (but not both) is not worth keeping. In the general case, the work
directory isn't even worth keeping. The mistake was to "make update"
in png, because the packages you built automatically were useless
without all the other library packages being updated, too.
I seem to remember that "make update" gets around that by throwing in
"make clean"'s either before or after building,... which puts it
completely at odds with your purposes.
What works is to identify the packages that fulfill dependencies ("ls
/var/db/pkg/*/+REQUIRED_BY"), identify the packages that have
dependencies fulfilled, then "pkg_delete -r" from the bottom, and
"make package" from the top.
> Something where I go to '/usr/pkgsrc' and simply type 'make update' would be
> wonderful, but I've been studying the problem, and it *IS* a tough nut to
> crack. It's probably too hard a problem for a shell script.
I've started work on an awk script to collate the packages into
"bundles", and then use that to emit a script to update a certain
package, or all installed packages, or all uninstalled packages.
I still need to think through some of the rough edges.