svn commit: r348861 - head/Mk
Bryan Drewery
bdrewery at FreeBSD.org
Sun Mar 23 15:21:43 UTC 2014
Author: bdrewery
Date: Sun Mar 23 15:21:42 2014
New Revision: 348861
URL: http://svnweb.freebsd.org/changeset/ports/348861
QAT: https://qat.redports.org/buildarchive/r348861/
Log:
- pkgng: Create package in WRKDIR and then try to link it to the PACKAGES dir.
If that fails, copy it. This fixes packaging as non-root when not able to
write to the PACKAGES dir which causes the following warning:
pkg-static: archive_write_open_filename(/usr/ports/packages/All/myport-1.2.3.txz): Bad file descriptor
We do the same thing for pkg_install already.
With hat: portmgr
Modified:
head/Mk/bsd.pkgng.mk
Modified: head/Mk/bsd.pkgng.mk
==============================================================================
--- head/Mk/bsd.pkgng.mk Sun Mar 23 15:16:06 2014 (r348860)
+++ head/Mk/bsd.pkgng.mk Sun Mar 23 15:21:42 2014 (r348861)
@@ -245,7 +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 ${PKGREPOSITORY} ${PKGNAME}; then \
+ @if ${SETENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CREATE} ${PKG_CREATE_ARGS} -o ${WRKDIR} ${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}; \
+ fi; \
if [ "${PKGORIGIN}" = "ports-mgmt/pkg" -o "${PKGORIGIN}" = "ports-mgmt/pkg-devel" ]; then \
if [ ! -d ${PKGLATESTREPOSITORY} ]; then \
if ! ${MKDIR} ${PKGLATESTREPOSITORY}; then \
More information about the svn-ports-all
mailing list