Subject: Re: Best way to keep you pkgsrc software up2date
To: David Rio Deiros <driodeiros@gmail.com>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: netbsd-users
Date: 02/18/2005 21:37:23
In message <20050219014422.GA24183@toto.eracks.com>, David Rio Deiros writes:
>> Hello,
>
>Thanks so much for the answer Nuno.
>
>> I'm a recent user on NetBSD and I found that after a `cvs up -dP` in
>> pkgsrc you can use 2 good utilities to see what programs need to be
>> updated:
>> 
>> 1.	pkgtools/pkglint:
>> 
>> 	lintpkgsrc -i
>> 
>> 	Scanning Makefiles: 5368 packages                            
>> 	Version mismatch: 'netpbm' 10.26.1 vs 10.26.3
>> 	Version mismatch: 'pkglint' 4.04 vs 4.05
>> 
>> And this tool its very good because it cleans your distfiles directory
>> as well if you want it.
>
>I read about this one already. 
>
>> 2.	pkgtools/pkg_chk:
>> 
>> 	pkg_chk -i
>> 
>> 	pkglint-4.05: version mismatch - pkglint-4.04
>> 	netpbm-10.26.3: version mismatch - netpbm-10.26.1
>> 
>> This tool can update your programs that need to be upgraded with:
>> 
>> 	pkg_chk -u (e.g.)
>
>Great! That's what I was looking for!
>

I don't recommend this path.  Note what it says about extra rebuilds in 
the BUGS section.  A better path is to use pkgdepgraph:

	lintpkgsrc -i >/tmp/out_of_date
	pkgdepgraph -D /tmp/out_of_date >/tmp/delete
	pkgdepgraph -R /tmp/out_of_date >/tmp/rebuild
	pkg_delete `cat /tmp/delete`
	sh /tmp/rebuild

The risk you take is that something won't rebuild...

		--Prof. Steven M. Bellovin, http://www.cs.columbia.edu/~smb