diff options
author | Bryan Drewery <bdrewery@FreeBSD.org> | 2014-03-23 15:21:42 +0000 |
---|---|---|
committer | Bryan Drewery <bdrewery@FreeBSD.org> | 2014-03-23 15:21:42 +0000 |
commit | ca93c6f7e13606f1e3f3001e5181ee046de9f047 (patch) | |
tree | 9665b0b794680b44b9005bef6a9108dfb61d271b | |
parent | - Update to 1.9.1.0, announce message is here: (diff) |
- 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
Notes
Notes:
svn path=/head/; revision=348861
-rw-r--r-- | Mk/bsd.pkgng.mk | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Mk/bsd.pkgng.mk b/Mk/bsd.pkgng.mk index 9c19f9895159..f3e47b1fb12f 100644 --- a/Mk/bsd.pkgng.mk +++ b/Mk/bsd.pkgng.mk @@ -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 \ |