aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2014-03-23 23:34:13 +0800
committerbdrewery <bdrewery@FreeBSD.org>2014-03-23 23:34:13 +0800
commitcc7828a52c64fbc324c5f1b87a2643226b302994 (patch)
tree2353d5ec3338ff1793a3ee3a3a5c996d7442b7e8
parent899868dbb7db73a15bb8cae7741444959b5647cc (diff)
downloadfreebsd-ports-gnome-cc7828a52c64fbc324c5f1b87a2643226b302994.tar.gz
freebsd-ports-gnome-cc7828a52c64fbc324c5f1b87a2643226b302994.tar.zst
freebsd-ports-gnome-cc7828a52c64fbc324c5f1b87a2643226b302994.zip
- Create package in WRKDIR/pkg/ instead of WORKDIR/ to avoid pkg-create bug
not creating the PKGNAME.PKG_SUFX if PKGNAME already exists. Fixes regression packaging some from r348861 With hat: portmgr
-rw-r--r--Mk/bsd.pkgng.mk7
-rw-r--r--Mk/bsd.port.mk13
2 files changed, 11 insertions, 9 deletions
diff --git a/Mk/bsd.pkgng.mk b/Mk/bsd.pkgng.mk
index a0724744978b..25b2012d44bf 100644
--- a/Mk/bsd.pkgng.mk
+++ b/Mk/bsd.pkgng.mk
@@ -245,10 +245,11 @@ do-package: ${TMPPLIST}
@for cat in ${CATEGORIES}; do \
${RM} -f ${PACKAGES}/$$cat/${PKGNAMEPREFIX}${PORTNAME}*${PKG_SUFX} ; \
done
- @if ${SETENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CREATE} ${PKG_CREATE_ARGS} -o ${WRKDIR} ${PKGNAME}; then \
+ @${MKDIR} ${WRKDIR}/pkg
+ @if ${SETENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CREATE} ${PKG_CREATE_ARGS} -o ${WRKDIR}/pkg ${PKGNAME}; then \
if [ -d ${PKGREPOSITORY} -a -w ${PKGREPOSITORY} ]; then \
- ${LN} -f ${WRKDIR}/${PKGNAME}${PKG_SUFX} ${PKGFILE} 2>/dev/null \
- || ${CP} -af ${WRKDIR}/${PKGNAME}${PKG_SUFX} ${PKGFILE}; \
+ ${LN} -f ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} ${PKGFILE} 2>/dev/null \
+ || ${CP} -af ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} ${PKGFILE}; \
if [ "${PKGORIGIN}" = "ports-mgmt/pkg" -o "${PKGORIGIN}" = "ports-mgmt/pkg-devel" ]; then \
if [ ! -d ${PKGLATESTREPOSITORY} ]; then \
if ! ${MKDIR} ${PKGLATESTREPOSITORY}; then \
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index ff61705d6916..309688f6a0ae 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -3763,10 +3763,11 @@ do-package: ${TMPPLIST}
if [ -f ${PKGMESSAGE} ]; then \
_LATE_PKG_ARGS="$${_LATE_PKG_ARGS} -D ${PKGMESSAGE}"; \
fi; \
- if ${PKG_CMD} -S ${STAGEDIR} ${PKG_ARGS} ${WRKDIR}/${PKGNAME}${PKG_SUFX}; then \
+ ${MKDIR} ${WRKDIR}/pkg; \
+ if ${PKG_CMD} -S ${STAGEDIR} ${PKG_ARGS} ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX}; then \
if [ -d ${PKGREPOSITORY} -a -w ${PKGREPOSITORY} ]; then \
- ${LN} -f ${WRKDIR}/${PKGNAME}${PKG_SUFX} ${PKGFILE} 2>/dev/null || \
- ${CP} -af ${WRKDIR}/${PKGNAME}${PKG_SUFX} ${PKGFILE}; \
+ ${LN} -f ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} ${PKGFILE} 2>/dev/null || \
+ ${CP} -af ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} ${PKGFILE}; \
cd ${.CURDIR} && eval ${MAKE} package-links; \
fi; \
else \
@@ -3816,7 +3817,7 @@ delete-package: delete-package-links
@${RM} -f ${PKGFILE}
. else
# When staging, the package may only be in the workdir if not root
- @${RM} -f ${PKGFILE} ${WRKDIR}/${PKGNAME}${PKG_SUFX} 2>/dev/null || :
+ @${RM} -f ${PKGFILE} ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} 2>/dev/null || :
. endif
.endif
@@ -3842,8 +3843,8 @@ delete-package-list: delete-package-links-list
_INSTALL_PKG_ARGS= -f
.endif
install-package:
-.if exists(${WRKDIR}/${PKGNAME}${PKG_SUFX})
- @${PKG_ADD} ${_INSTALL_PKG_ARGS} ${WRKDIR}/${PKGNAME}${PKG_SUFX}
+.if exists(${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX})
+ @${PKG_ADD} ${_INSTALL_PKG_ARGS} ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX}
.else
@${PKG_ADD} ${_INSTALL_PKG_ARGS} ${PKGFILE}
.endif