Subject: Re: Damn it! pkgsrc stupidity again
To: None <tech-pkg@netbsd.org>
From: George Georgalis <george@galis.org>
List: tech-pkg
Date: 11/06/2006 10:48:37
On Wed, Nov 01, 2006 at 02:04:14PM -0800, David Griffith wrote:
>On Wed, 1 Nov 2006, Christian Biere wrote:
>
>> David Griffith wrote:
>> > I've been burned a few times with the delete-before-check thing.  The
>> > extra time it takes to check for vulnerability is trivial, especially
>> > considering the time it would take to fiddle around and put back the old
>> > version.
>>
>> Doesn't this check have to be recursive?
>
>I don't see why.

interesting observation, since the check is only for available
updates, just check each installed package (once) for available
updates.

pkg_chk -un | grep 'version mismatch' | sed -e 's/.* //' | while read p; do cd /usr/pkgsrc/`pkg_info -Q PKGPATH $p` && printf  "cd $PWD && make update\n" ; done

as awkward as that command line is it, it works very nicely in
cron, until the last pkg_chk revision (when it broke), it would
generate no email for no updates or the commands required to
update, when there are available updates.

But now it responds

/usr/pkg/sbin/pkg_chk: /usr/pkgsrc/pkgchk_update-dev.conf: No such file or directory

because "pkg_chk -un" seems broken (it won't write the conf file
(-n) but it needs it to do an update (-u). I thought I had a
reasonable pkg_chk patch, but it doesn't work when updates are
required.... *sigh*

(nevermind the delete before update issue, for which "make && make
update" works pretty well to avoid the problem)

// George


-- 
George Georgalis, systems architect, administrator <IXOYE><