pkgaudit_check is wrongly saying there's new versions for py39-joblib and py39-OWSLib and displays the 'new' version number multiple times.
The relevant section of pkgaudit_check is:
And
I made a change to the script to only use the first value returned by pkg-rquery(8)
This appears to fix the problem.
But is this a bug with pkg-rquery() or with pkgaudit_check?
Code:
Updating FreeBSD repository catalogue...
Fetching packagesite.pkg: .......... done
Processing entries: .......... done
FreeBSD repository update completed. 33918 packages processed.
All repositories are up to date.
virtualbox-ose-6.1.44_1 - new version 6.1.46 available
py39-joblib-1.1.0 - new version 1.1.0 1.1.0 available
py39-OWSLib-0.28.0 - new version 0.28.0 0.28.0 0.28.0 available
ungoogled-chromium-114.0.5735.198 - new version 115.0.5790.98 115.0.5790.98 available
Code:
for package in $(pkg audit -q)
do
rc=1
name=$(pkg query %n $package)
repo_version=$(pkg rquery %v $name)
if [ "$repo_version" != "" ]; then
this_version=$(pkg query %v $package)
if [ "$this_version" != "$repo_version" ]; then
echo $package - new version $repo_version available
fi
fi
done
pkg rquery
is returning multiple values for some packages:
Code:
curlew:/usr/local/etc/periodic/daily% pkg rquery %v py39-joblib
1.1.0
1.1.0
curlew:/usr/local/etc/periodic/daily% pkg rquery %v py39-OWSLib
0.28.0
0.28.0
0.28.0
Code:
repo_version=$(pkg rquery %v $name | head -1)
Code:
curlew:/tmp% sh pkgaudit_check
Checking availability of upgrades for vulnerable packages
virtualbox-ose-6.1.44_1 - new version 6.1.46 available
ungoogled-chromium-114.0.5735.198 - new version 115.0.5790.98 available