pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

audit-packages -p pkg



Hi,

when using audit-packages' -p option the specified package name has
to include the full version number, e.g. `php-4.4.4nb3' instead of
just `php':

$ audit-packages
Package php-4.4.4nb3 has a [...]
[...]
$ audit-packages -p php
$ 

Is this intended behaviour? In case it's not: the attached patch fixes
the problem. Comments are welcome.


Cheers, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~
Index: security/audit-packages/files/audit-packages
===================================================================
RCS file: /cvsroot/pkgsrc/security/audit-packages/files/audit-packages,v
retrieving revision 1.28
diff -u -p -r1.28 audit-packages
--- security/audit-packages/files/audit-packages        5 Oct 2006 14:26:42 
-0000       1.28
+++ security/audit-packages/files/audit-packages        5 Nov 2006 14:30:06 
-0000
@@ -197,8 +197,9 @@ while read pat type url; do
                vulnpkgs=`@PKG_TOOLS_BIN@/pkg_info -e "$pat"`
        else
                vulnpkgs=
-               if `@PKG_TOOLS_BIN@/pkg_admin pmatch "$pat" "$one_package"` ; 
then
-                       vulnpkgs=$one_package
+               one_pkg=`@PKG_TOOLS_BIN@/pkg_info -e "$one_package"`
+               if `@PKG_TOOLS_BIN@/pkg_admin pmatch "$pat" "$one_pkg"` ; then
+                       vulnpkgs=$one_pkg
                fi
        fi
        for pkg in $vulnpkgs ; do


Home | Main Index | Thread Index | Old Index