From owner-svn-ports-head@FreeBSD.ORG Sun Mar 23 15:21:43 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5641ACBB; Sun, 23 Mar 2014 15:21:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 43D97350; Sun, 23 Mar 2014 15:21:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2NFLhnV055711; Sun, 23 Mar 2014 15:21:43 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2NFLhjZ055710; Sun, 23 Mar 2014 15:21:43 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201403231521.s2NFLhjZ055710@svn.freebsd.org> From: Bryan Drewery Date: Sun, 23 Mar 2014 15:21:43 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r348861 - head/Mk X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Mar 2014 15:21:43 -0000 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 \