Index: portaudit/files/portaudit-cmd.sh =================================================================== --- portaudit/files/portaudit-cmd.sh (revision 337284) +++ portaudit/files/portaudit-cmd.sh (working copy) @@ -53,6 +53,10 @@ : ${portaudit_fixed=""} : ${portaudit_openssl:="/usr/bin/openssl"} + + # check if new pkg tools are in use + : ${pkgng_db:="/var/db/pkg/local.sqlite"} + : ${PKGSTATIC:="%%PREFIX%%/sbin/pkg-static"} } extract_auditfile_raw() @@ -438,6 +442,18 @@ echo "portaudit version %%PORTVERSION%%" fi +if [ -e $pkgng_db -a -x $PKGSTATIC ]; then + IPKGNG=`echo 'select count() from packages;' | $PKGSTATIC shell` + if [ $IPKGNG -ge 1 ]; then + echo " It seems this system use already the new pkg tools" + echo " $pkgng_db and $IPKGNG installed packages found ..." + echo + echo " Please use the command 'pkg audit' instead" + echo " For more information see man pkg-audit(8)" + exit 1 + fi +fi + if $opt_fetch; then if $opt_quiet ; then portaudit_fetch_cmd="${portaudit_fetch_cmd} -q"