Subject: Re: pkgsrc and already installed binary pkgs
To: None <port-i386@netbsd.org>
From: Wolfgang S. Rupprecht <wolfgang+gnus20040531T202330@dailyplanet.dontspam.wsrcc.com>
List: port-i386
Date: 05/31/2004 21:01:45
> No, it's not great. But there aren't great solutions here, unless
> there's a thorough archive of many different versions of many packages.
> And it's even worse than I've just outlined, since you'll often find
> that something doesn't rebuild properly.
I've been looking at how some of the other BSD's handle this, and
pkgsrc (especially when augmented with pkgdepgraph and pkg_chk) is way
above the competition.
I found that updating the pkgsrc tree to -current and then using
"lintpkgsrc -i" to find the out of date pkgs and updating with
pkgdepgraph is the least painful way to go. Pain is relative though
and if something fundamental like png changes, expect 10-20 hours of
an unusable system with only the core non-pkgs utilities.
set -e
cd /usr/pkgsrc
cvs -dAP
lintpkgsrc -omr
lintpkgsrc -i > pkgdepgraph.in
pkgdepgraph -D pkgdepgraph.in > delete_order
pkgdepgraph -R pkgdepgraph.in > rebuild.sh
pkgdepgraph -F pkgdepgraph.in > fetch.sh
sh fetch.sh && mv fetch.sh fetch.sh~
pkg_delete `cat delete_order` && mv delete_order delete_order~
sh rebuild.sh
/bin/rm -f pkgdepgraph.in delete_order~ rebuild.sh fetch.sh~
Now on bad days, I may need to find what didn't rebuild, comment out
the broken build on rebuild.sh and rerun that by hand. Still it beats
rebuilding it all by hand.
-wolfgang