Date: Sun, 23 Mar 2014 15:21:43 +0000 (UTC) From: Bryan Drewery <bdrewery@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r348861 - head/Mk Message-ID: <201403231521.s2NFLhjZ055710@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403231521.s2NFLhjZ055710>