aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Mk/bsd.port.mk9
1 files changed, 8 insertions, 1 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 0273d2b30e3b..41d42bf92280 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -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.' \