Subject: Re: FreeBSD user questions
To: None <rasputin@idoru.mine.nu>
From: Greg A. Woods <woods@weird.com>
List: netbsd-users
Date: 04/29/2002 13:27:42
[ On Monday, April 29, 2002 at 11:04:04 (+0100), rasputin@idoru.mine.nu wrote: ]
> Subject: FreeBSD user questions
>
> just migrated my box from FreeBSD-stable to NetBSD-stable
> (ur, I think? Not got my head round CVS tags yet)
> 
> Just wondered how you folks figure out if your packages are out of date?

Generally I just look in the Makefile and compare it against what
pkg_info tells me!  ;-)

But there is a better way -- it's an option to lintpkgsrc

I have the following in place on my development machine.  This is a
fragment of a larger script that keeps a local copy of pkgsrc in sync
with the master repository ($WORK_DIRs is a series of CVS working
directories checked out from an rsync'ed copy of the NetBSD CVS
repository, thus the test to see if it's "pkgsrc" before running
lintpkgsrc).  The output of this script is mailed to me, and as you can
see a static copy of lintpkgsrc's output is also saved in a file:

for work_dir in $WORK_DIRS; do
        printf "\nSTART:%s: cvs update $work_dir\n\n" "$(date '+%Y/%m/%d-%T')"
	cd $work_dir && cvs -u -q update -P -d
        printf "\nDONE:%s: updating $work_dir\n" "$(date '+%Y/%m/%d-%T')"
	if [ -x /usr/pkg/bin/lintpkgsrc -a -f $work_dir/packages-to-upgrade -a $(basename $work_dir) = "pkgsrc" ] ; then
		/usr/pkg/bin/lintpkgsrc -P $work_dir -i | tee $work_dir/packages-to-upgrade.new
		if [ -s $work_dir/packages-to-upgrade.new ] ; then
			mv -f $work_dir/packages-to-upgrade.new  $work_dir/packages-to-upgrade
		fi
	fi
done

The whole script is available upon request....

-- 
								Greg A. Woods

+1 416 218-0098;  <gwoods@acm.org>;  <g.a.woods@ieee.org>;  <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>