From owner-svn-ports-all@FreeBSD.ORG Thu Sep 20 19:51:30 2012 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9FA48106564A; Thu, 20 Sep 2012 19:51:30 +0000 (UTC) (envelope-from beat@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A6B68FC08; Thu, 20 Sep 2012 19:51:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8KJpUke085154; Thu, 20 Sep 2012 19:51:30 GMT (envelope-from beat@svn.freebsd.org) Received: (from beat@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8KJpUNr085151; Thu, 20 Sep 2012 19:51:30 GMT (envelope-from beat@svn.freebsd.org) Message-Id: <201209201951.q8KJpUNr085151@svn.freebsd.org> From: Beat Gaetzi Date: Thu, 20 Sep 2012 19:51:30 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r304594 - head/Mk X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2012 19:51:30 -0000 Author: beat Date: Thu Sep 20 19:51:30 2012 New Revision: 304594 URL: http://svn.freebsd.org/changeset/ports/304594 Log: - Remove ftp fallback as all supported FreeBSD versions provide fetch [1] - Don't call 'pre-config' twice in the 'config-conditional' target [2] - Clean up pkgng metadir so that the 'clean' target can be executed without root permissions if the build was done with a non-root user. [3] - Make 'do-package' atomic while creating the pkg file [4] PR: ports/171161 [2], ports/171329 [3], ports/171672 [4] Submitted by: bapt [1], A.J. Kehoe IV (Nanoman) [2], Submitted by: bdrewery [3, 4] Reported by: Kimmo Paasiala [3] Tested by: Exp-run on pointyhat, bapt (pkgng changes) Modified: head/Mk/bsd.pkgng.mk head/Mk/bsd.port.mk Modified: head/Mk/bsd.pkgng.mk ============================================================================== --- head/Mk/bsd.pkgng.mk Thu Sep 20 19:34:53 2012 (r304593) +++ head/Mk/bsd.pkgng.mk Thu Sep 20 19:51:30 2012 (r304594) @@ -123,6 +123,7 @@ fake-pkg: .else @${PKG_CMD} -l -m ${METADIR} -f ${TMPPLIST} .endif + @${RM} -rf ${METADIR} .else @${DO_NADA} .endif @@ -230,11 +231,16 @@ do-package: ${TMPPLIST} fi; \ fi; \ fi; - @if ${PKG_CREATE} -o ${PKGREPOSITORY} ${PKGNAME}; then \ + @TMPPKGREPOSITORY=$$(mktemp -dt pkg); \ + trap "${RM} -rf $${TMPPKGREPOSITORY}; exit 1" 1 2 3 5 10 13 15; \ + if ${PKG_CREATE} -o $${TMPPKGREPOSITORY} ${PKGNAME}; then \ + ${MV} -f $${TMPPKGREPOSITORY}/${PKGNAME}${PKG_SUFX} ${PKGREPOSITORY}; \ + ${RM} -rf $${TMPPKGREPOSITORY}; \ if [ -d ${PACKAGES} ]; then \ cd ${.CURDIR} && eval ${MAKE} package-links; \ fi; \ else \ + ${RM} -rf $${TMPPKGREPOSITORY}; \ cd ${.CURDIR} && eval ${MAKE} delete-package; \ exit 1; \ fi Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Thu Sep 20 19:34:53 2012 (r304593) +++ head/Mk/bsd.port.mk Thu Sep 20 19:51:30 2012 (r304594) @@ -2246,18 +2246,12 @@ MAKE_ENV+= PATH=${LOCALBASE}/libexec/cca PTHREAD_CFLAGS?= PTHREAD_LIBS?= -pthread -.if exists(/usr/bin/fetch) FETCH_BINARY?= /usr/bin/fetch FETCH_ARGS?= -AFpr FETCH_REGET?= 1 .if !defined(DISABLE_SIZE) FETCH_BEFORE_ARGS+= $${CKSIZE:+-S $$CKSIZE} .endif -.else -FETCH_BINARY?= /usr/bin/ftp -FETCH_ARGS?= -R -FETCH_REGET?= 0 -.endif FETCH_CMD?= ${FETCH_BINARY} ${FETCH_ARGS} .if defined(RANDOMIZE_MASTER_SITES) @@ -3911,11 +3905,15 @@ do-package: ${TMPPLIST} fi; \ fi; \ fi - @if ${PKG_CMD} -b ${PKGNAME} ${PKGFILE}; then \ + @TMPPKGFILE=$$(mktemp -t pkg); \ + trap "${RM} -f $${TMPPKGFILE} $${TMPPKGFILE}${PKG_SUFX}; exit 1" 1 2 3 5 10 13 15; \ + if ${PKG_CMD} -b ${PKGNAME} $${TMPPKGFILE}; then \ + ${MV} -f $${TMPPKGFILE}${PKG_SUFX} ${PKGFILE}; \ if [ -d ${PACKAGES} ]; then \ cd ${.CURDIR} && eval ${MAKE} package-links; \ fi; \ else \ + ${RM} -f $${TMPPKGFILE}; \ cd ${.CURDIR} && eval ${MAKE} delete-package; \ exit 1; \ fi @@ -6089,8 +6087,8 @@ DEFOPTIONS+= ${opt} "S(${single}): "${${ .undef opt .endif # pre-config -.if !target(config) -config: pre-config +.if !target(do-config) +do-config: .if empty(ALL_OPTIONS) && empty(OPTIONS_SINGLE) && empty(OPTIONS_MULTI) @${ECHO_MSG} "===> No options to configure" .else @@ -6141,6 +6139,10 @@ config: pre-config ${RM} -f $${TMPOPTIONSFILE} @cd ${.CURDIR} && ${MAKE} sanity-config .endif +.endif # do-config + +.if !target(config) +config: pre-config do-config .endif # config .if !target(config-recursive) @@ -6155,7 +6157,7 @@ config-recursive: config-conditional: pre-config .if defined(COMPLETE_OPTIONS_LIST) && !defined(NO_DIALOG) . if !defined(_FILE_COMPLETE_OPTIONS_LIST) || ${COMPLETE_OPTIONS_LIST:O} != ${_FILE_COMPLETE_OPTIONS_LIST:O} - @cd ${.CURDIR} && ${MAKE} config; + @cd ${.CURDIR} && ${MAKE} do-config; . endif .endif .endif # config-conditional