Subject: Re: Global pkgsrc update
To: Brian Rose <lists@brianrose.net>
From: Steven M. Bellovin <smb@research.att.com>
List: netbsd-users
Date: 07/22/2004 23:39:25
In message <410082C9.8080502@brianrose.net>, Brian Rose writes:
>I have decided to add some software to a netbsd machine that has been up and r
>unning for several months, maybe a year with no updates. Upon running 'lintpkg
>src -i' I have found that many (about 15) of my packages are out of date. Is t
>here a global update that will update all my old packages, or do I need to wri
>te them all down and update them one at a time?
>

This is practically an FAQ -- I sure didn't know how to do it until 
someone posted it.

First -- install pkgdepgraph and pkglint.  Then run the following:

	lintpkgsrc -i >ood-list
	pkgdepgraph -D ood-list >del-list
	pkgdepgraph -R ood-list >rebuild.sh
	pkg_delete `cat del-list`
	sh rebuild.sh

That generally works, though you sometimes need to edit ood-list to 
delete packages that are no longer known.  And of course, you always 
take the risk that something will no longer build.

		--Steve Bellovin, http://www.research.att.com/~smb