pbulk-0.62: cleanup if either the initial pkg_add round or the package

upload failed.
This commit is contained in:
joerg 2016-12-18 09:36:38 +00:00
parent 0ece84b356
commit 16ca8d25dd
2 changed files with 5 additions and 5 deletions

View file

@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.77 2016/05/09 00:08:21 joerg Exp $
# $NetBSD: Makefile,v 1.78 2016/12/18 09:36:38 joerg Exp $
PKGNAME= pbulk-0.61
PKGNAME= pbulk-0.62
COMMENT= Modular bulk build framework
.include "../../pkgtools/pbulk/Makefile.common"

View file

@ -1,5 +1,5 @@
#!@SH@
# $NetBSD: pkg-build,v 1.30 2016/05/09 00:08:21 joerg Exp $
# $NetBSD: pkg-build,v 1.31 2016/12/18 09:36:38 joerg Exp $
#
# Copyright (c) 2007, 2008 Joerg Sonnenberger <joerg@NetBSD.org>.
# All rights reserved.
@ -179,7 +179,7 @@ cd ${pkgsrc}/${pkgdir}
${make} clean > ${bulklog}/${pkgname}/pre-clean.log 2>&1
# Install all dependencies the package said it would need
if [ ! -z "$dependencies" ]; then
${pkg_add_cmd} $dependencies > ${bulklog}/${pkgname}/depends.log 2>&1
${pkg_add_cmd} $dependencies > ${bulklog}/${pkgname}/depends.log 2>&1 || cleanup
fi
# Build package, create a separate log file for each major phase
run_make ${run_checksum} checksum > ${bulklog}/${pkgname}/checksum.log 2>&1 || cleanup
@ -214,7 +214,7 @@ fi
# This is quite expensive and mostly redundant, so it is disabled by default.
#${pkg_delete} -r \* > /dev/null 2>&1 || cleanup
${sync_package} ${pkgfile} ${pkgname} "${categories}"
${sync_package} ${pkgfile} ${pkgname} "${categories}" || cleanup
# Clean build area
${make} clean > ${bulklog}/${pkgname}/clean.log 2>&1 || true