Subject: Re: Package Pain Prevention Procedure
To: Bernhard Riedel <bernhard@SDG.de>
From: Gavan Fantom <gavan@coolfactor.org>
List: tech-pkg
Date: 09/06/2004 12:18:18
On Mon, 6 Sep 2004, Bernhard Riedel wrote:

> I build packages from source, on my main box I have ~470 packages.
> Every now and then, I do a cvs update on my pkgsrc tree.
> After finding out which packages were updated ("pkg_chk -c" or
> "cd /usr/pkgsrc ; make show-downlevel") I did "make update"
> in each one of the affected package directories.
> Often I ended up rebuilding gimp, mozilla or other elephants many
> times in a row.
> One weekend, I rebuilt gimp 7 times. This was painful, my hardware
> isn't particularly fast;)
> After years of suffering, I found an easy improvement.

That's a neat little trick.

Have you considered using pkg_comp? Once you have set it up correctly, the 
procedure becomes:

* cvs update pkgsrc
* remove any out of date binary packages you have lying around
* remove any binary packages with missing dependencies
* make a list of all the "top level" packages you need to update. do this 
by listing all out of date packages, and noting the package at the *top* 
of the dependency tree.
* use pkg_comp to build the packages. for example, pkg_comp auto 
meta-pkgs/kde3 www/mozilla
* if there were no errors in building, delete your old packages and 
install the new binaries. i use pkg_chk -r ; pkg_chk -abk to do that, but 
that depends on having pkgchk.conf set up.

It's a little bit more complicated than your method, but it does have the 
advantage that if your packages take a long time to build, you're not left 
without them for the duration of the build. Also, if they fail to build, 
you still have the old packages installed.

-- 
Gillette - the best a man can forget