aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2014-04-17 06:27:38 +0800
committerbdrewery <bdrewery@FreeBSD.org>2014-04-17 06:27:38 +0800
commit27c03d830b3b98e53515fe062cec898e6aae6ec2 (patch)
tree2dd5a5e2199da245d75e5eadee1639d1f87ede5f
parentd19b9ff8155fe4018695e644ec64a92b1417a972 (diff)
downloadfreebsd-ports-gnome-27c03d830b3b98e53515fe062cec898e6aae6ec2.tar.gz
freebsd-ports-gnome-27c03d830b3b98e53515fe062cec898e6aae6ec2.tar.zst
freebsd-ports-gnome-27c03d830b3b98e53515fe062cec898e6aae6ec2.zip
- Detect failure to create PREFIX for pkg_install workaround added in r351422
With hat: portmgr
-rw-r--r--Mk/bsd.port.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index a38f803c4e36..79ed61f57c46 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -3824,8 +3824,12 @@ do-package: ${TMPPLIST}
fi; \
${MKDIR} ${WRKDIR}/pkg; \
if ! [ -d "${PREFIX}" ]; then \
+ if ! ${MKDIR} ${PREFIX}; then \
+ ${ECHO_MSG} "=> Unable to create PREFIX. PREFIX must exist to create a package with pkg_install." >&2; \
+ ${ECHO_MSG} "=> Manually create ${PREFIX} first." >&2; \
+ exit 1; \
+ fi; \
made_prefix=1; \
- ${MKDIR} ${PREFIX}; \
fi; \
if ${PKG_CMD} -S ${STAGEDIR} ${PKG_ARGS} ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX}; then \
[ -n "$${made_prefix}" ] && ${RMDIR} ${PREFIX}; \