Subject: Re: Smarter make update / pkg_chk algo
To: Rhialto <rhialto@azenomei.knuffel.net>
From: Gavan Fantom <gavan@coolfactor.org>
List: tech-pkg
Date: 05/07/2005 11:45:24
Rhialto wrote:
> On Wed 04 May 2005 at 11:41:13 +0200, Hubert Feyrer wrote:
>
>>FWIW, the final url is http://www.coolfactor.org/~gavan/update/
>
>
> This takes rather long in the phase "Checking packages which require
> work". Can't it just do a "pkg_chk -n -c", and build the ones that
> result in "ORBit-0.5.17: version mismatch - ORBit-0.5.15nb7" and not
> build the ones that result in "tiff-3.7.1nb3: version mismatch -
> tiff-3.6.1nb6 (binary package available)" ?
The script currently does the following:
* Invokes pkg_chk to get an initial list of stuff that is out of date
* Walks up the installed dependency tree to add to the list all packages
which depend on anything already in the list
* Removes from the list any packages which are dependencies
This leaves us with a list of packages which are at the top of the tree,
which need building. In your example, ORBit and tiff would be expanded
to everything that depends on ORBit and tiff, and would then be reduced
to top-level packages, such as meta-pkgs/kde3.
pkg_comp is then instructed to build meta-pkgs/kde3, which pulls in
everything else as dependencies.
pkg_comp is set up to use binary packages where available, so tiff would
be installed from a binary package rather than rebuilt.
> What I'm currently looking for is a way to install a bunch of binary
> packages, which is partly up to date with pkgsrc-2005Q1. By which I mean
> that some packages have not been updated, but the set is (I hope)
> internally consistent. I want to update what I have new, and leave alone
> what is not. There are also older versions of packages around, so I
> can't just install everything that't there.
In general, you can't do this. You need your binary packages not only to
be internally consistent, but also consistent with respect to the other
packages on your system.
You can't, for example, update tiff until *everything* that depends on
tiff is ready to be updated as well. You need two complete trees which
do not share a common node, which in practice does not happen very often
at all in pkgsrc.
--
Gilette - the best a man can forget