aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/bsd.pkgng.mk
diff options
context:
space:
mode:
authorbeat <beat@FreeBSD.org>2012-09-21 03:51:30 +0800
committerbeat <beat@FreeBSD.org>2012-09-21 03:51:30 +0800
commita6ae37c143e13aa3663ceb1d1c4185a53c80006c (patch)
tree9e81dbcc2a9036b962d7aaaeb44baa3ea6c59fcf /Mk/bsd.pkgng.mk
parent86f9578edb7281689e1e2f8ea6c0c149cc891a7c (diff)
downloadfreebsd-ports-gnome-a6ae37c143e13aa3663ceb1d1c4185a53c80006c.tar.gz
freebsd-ports-gnome-a6ae37c143e13aa3663ceb1d1c4185a53c80006c.tar.zst
freebsd-ports-gnome-a6ae37c143e13aa3663ceb1d1c4185a53c80006c.zip
- 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) <m7k60pkr@nanoman.ca> [2], Submitted by: bdrewery [3, 4] Reported by: Kimmo Paasiala <kpaasial@gmail.com> [3] Tested by: Exp-run on pointyhat, bapt (pkgng changes)
Diffstat (limited to 'Mk/bsd.pkgng.mk')
-rw-r--r--Mk/bsd.pkgng.mk8
1 files changed, 7 insertions, 1 deletions
diff --git a/Mk/bsd.pkgng.mk b/Mk/bsd.pkgng.mk
index 461104d9614f..90d934b4ad2c 100644
--- a/Mk/bsd.pkgng.mk
+++ b/Mk/bsd.pkgng.mk
@@ -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