diff options
Diffstat (limited to 'mk/flavor/pkg/package.mk')
-rw-r--r-- | mk/flavor/pkg/package.mk | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mk/flavor/pkg/package.mk b/mk/flavor/pkg/package.mk index 407bdd2c7d8..ada236d2efc 100644 --- a/mk/flavor/pkg/package.mk +++ b/mk/flavor/pkg/package.mk @@ -1,4 +1,4 @@ -# $NetBSD: package.mk,v 1.12 2007/11/07 17:30:01 rillig Exp $ +# $NetBSD: package.mk,v 1.13 2008/01/03 23:21:48 rillig Exp $ PKG_SUFX?= .tgz PKGFILE?= ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX} @@ -40,7 +40,13 @@ _PKG_ARGS_PACKAGE+= -E ${PKGFILE}: ${_CONTENTS_TARGETS} ${RUN} ${MKDIR} ${.TARGET:H} - ${RUN} ${PKG_CREATE} ${_PKG_ARGS_PACKAGE} ${.TARGET} + ${RUN} if ${PKG_CREATE} ${_PKG_ARGS_PACKAGE} ${.TARGET}.tmp; then \ + ${MV} -f ${.TARGET}.tmp ${.TARGET}; \ + else \ + exitcode=$$?; \ + ${RM} -f ${.TARGET}.tmp; \ + exit $$exitcode; \ + fi ###################################################################### ### package-remove (PRIVATE) |