Subject: RE: Apropos package upgrading.
To: Dave Burgess <email@example.com>
From: Hubert Feyrer <firstname.lastname@example.org>
Date: 03/20/2001 01:59:34
On Mon, 19 Mar 2001, Dave Burgess wrote:
> 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. Giving 'make' access to
> the packages database would work for me; if it could figure out what the
> package name is and compare it to the current package that's installed, it
> would meet my needs. Even if we don't have an automated method, if we could
> just get the packages to display in the order they were registered, I would
> be a happy person.
Check out the 'bulk-install' target (also set DEPENDS_TARGET=bulk-install
in /etc/mk.conf). It does about what you describe here - install a binary
pkg if it's available and upto date, and 'make package' otherwise (to get
an upto-date binary pkg for later use). A package is considered upto date
if none of it's depending (binar!) packages are newer than itself, and if
also all the pkg files (Makefile, pkg/*, ...) are newer. Check the full
story in pkgsrc/mk/bulk/bsd.bulk-pkg.mk.
> 1) A tag in the Makefile that actually gave the real package name. Having
make show-var VARNAME=PACKAGE ?
Or what do you mean?
> 2) Some kind of way to enforce package registration dates. Right now, I
> don't know what the ordering mechanism is, and I'm trusting basically to
> what appears to be blind luck that it works at all. Once in a while (on a
> couple of servers) the normal ordering has failed me, but it's been OK so
> far: nothing I couldn't solve with a little mental exercise.
ls -latr /var/db/pkg should do the trick, no?
(No, I'm not saying that's optimal :-)
> If I had these two things, a script that reinstalls the entire installed
> base (and just the installed base) based on whether or not a package had
> been updated would be a real possibility. I've got most of a script like
> that built now, but it's still problematic. I've got the dependency graph
> about 80% done. One of the egregious hacks I'm doing is checking the date
> on the 'work' directory against the 'Makefile'. This works OK, but only
> once. After that, the '.install' file changes the date and none of the rest
> of the updates work.
I don't know the details within it, but i thought 'make update' was an
attempt to do that. Dunno if that actually works (I never really use it).
Hubert Feyrer <email@example.com>