svn commit: r315599 - head/Mk

Bryan Drewery bdrewery at FreeBSD.org
Sat Mar 30 05:31:30 UTC 2013


Author: bdrewery
Date: Sat Mar 30 05:31:29 2013
New Revision: 315599
URL: http://svnweb.freebsd.org/changeset/ports/315599

Log:
  - Fix check-vulnerable failing when pkg(8) is not installed
    and WITH_PKGNG is set. This can happen when deinstall and
    reinstalling ports-mgmt/pkg in some cases
  
  With hat:	portmgr

Modified:
  head/Mk/bsd.port.mk

Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk	Sat Mar 30 05:13:30 2013	(r315598)
+++ head/Mk/bsd.port.mk	Sat Mar 30 05:31:29 2013	(r315599)
@@ -3424,7 +3424,14 @@ check-vulnerable:
 .if !defined(DISABLE_VULNERABILITIES) && !defined(PACKAGE_BUILDING)
 	@if [ -f "${AUDITFILE}" ]; then \
 		if [ -n "${WITH_PKGNG}" ]; then \
-			vlist=`${PKG_BIN} audit "${PKGNAME}"`; \
+			if [ -x "${PKG_BIN}" ]; then \
+				vlist=`${PKG_BIN} audit "${PKGNAME}"`; \
+			elif [ "${PORTNAME}" = "pkg" ]; then \
+				vlist=""; \
+			else \
+				${ECHO_MSG} "===> Unable to check vuln database as pkg(8) is missing"; \
+				exit 1; \
+			fi; \
 		elif [ -x "${LOCALBASE}/sbin/portaudit" ]; then \
 			vlist=`${LOCALBASE}/sbin/portaudit -X 14 "${PKGNAME}" \
 				2>&1 | grep -vE '^[0-9]+ problem\(s\) found.' \


More information about the svn-ports-head mailing list