aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2013-03-30 13:31:29 +0800
committerbdrewery <bdrewery@FreeBSD.org>2013-03-30 13:31:29 +0800
commit9988268403b2ed9e2f8d8e3d12ee261f27d3c6f9 (patch)
tree2695af799d193445f9d3528710831ae5f3cc98ac
parent32302418f14903d353b6fa4f309d516ab89ad14a (diff)
downloadfreebsd-ports-gnome-9988268403b2ed9e2f8d8e3d12ee261f27d3c6f9.tar.gz
freebsd-ports-gnome-9988268403b2ed9e2f8d8e3d12ee261f27d3c6f9.tar.zst
freebsd-ports-gnome-9988268403b2ed9e2f8d8e3d12ee261f27d3c6f9.zip
- 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
-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.' \