Skip to content

Commit

Permalink
pbulk-0.29:
Browse files Browse the repository at this point in the history
Add bulkbuild-restart script that checks if error/success files exist
and makes sense and continues the previous build if they do.
  • Loading branch information
joerg committed Apr 4, 2008
1 parent 16baf0c commit a5e3d34
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 5 deletions.
7 changes: 4 additions & 3 deletions pkgtools/pbulk/Makefile
@@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.36 2008/02/26 13:57:51 joerg Exp $
# $NetBSD: Makefile,v 1.37 2008/04/04 17:58:59 joerg Exp $

DISTNAME= pbulk-0.28
DISTNAME= pbulk-0.29
CATEGORIES= pkgtools
MASTER_SITES= # empty
DISTFILES= # empty
Expand Down Expand Up @@ -34,7 +34,8 @@ SUBST_CLASSES+= tools
SUBST_STAGE.tools= post-patch
SUBST_MESSAGE.tools= Fixing references to tools
SUBST_FILES.tools= pbulk.conf scripts/build scripts/build-client-start \
scripts/bulkbuild scripts/bulkbuild-rebuild scripts/client-clean \
scripts/bulkbuild scripts/bulkbuild-rebuild scripts/bulkbuild-restart \
scripts/client-clean \
scripts/pkg-build scripts/pkg-up-to-date scripts/pre-build \
scripts/report scripts/scan scripts/scan-client-start scripts/upload \
scripts/compute-packages.awk scripts/create-broken-graph.awk \
Expand Down
3 changes: 2 additions & 1 deletion pkgtools/pbulk/PLIST
@@ -1,6 +1,7 @@
@comment $NetBSD: PLIST,v 1.2 2008/01/26 01:57:00 joerg Exp $
@comment $NetBSD: PLIST,v 1.3 2008/04/04 17:58:59 joerg Exp $
bin/bulkbuild
bin/bulkbuild-rebuild
bin/bulkbuild-restart
bin/pbulk-build
bin/pbulk-resolve
bin/pbulk-scan
Expand Down
4 changes: 3 additions & 1 deletion pkgtools/pbulk/files/pbulk/scripts/Makefile
@@ -1,6 +1,7 @@
# $NetBSD: Makefile,v 1.2 2008/01/26 01:57:00 joerg Exp $
# $NetBSD: Makefile,v 1.3 2008/04/04 17:58:59 joerg Exp $

SCRIPTS= build build-client-start bulkbuild bulkbuild-rebuild \
bulkbuild-restart \
client-clean pkg-build pkg-up-to-date pre-build report \
scan scan-client-start upload \
compute-packages.awk create-broken-graph.awk \
Expand All @@ -10,5 +11,6 @@ SCRIPTS= build build-client-start bulkbuild bulkbuild-rebuild \
SCRIPTSDIR= ${PREFIX}/libexec/pbulk
SCRIPTSDIR_bulkbuild= ${PREFIX}/bin
SCRIPTSDIR_bulkbuild-rebuild= ${PREFIX}/bin
SCRIPTSDIR_bulkbuild-restart= ${PREFIX}/bin

.include <bsd.prog.mk>
32 changes: 32 additions & 0 deletions pkgtools/pbulk/files/pbulk/scripts/bulkbuild-restart
@@ -0,0 +1,32 @@
#!@SH@
# $NetBSD: bulkbuild-restart,v 1.1 2008/04/04 17:58:59 joerg Exp $

. @PBULK_CONFIG@

set -e

check_list() {
while read pkg
do
grep -q "^PKGNAME=${pkg}$" ${loc}/presolve && continue
return 1
done < "$1"
return 0
}

if [ ! -e ${loc}/success -o ! -e ${loc}/error ]; then
restart_build=no
elif ! check_list ${loc}/success; then
restart_build=no
elif ! check_list ${loc}/error; then
restart_build=no
else
restart_build=yes
fi
if [ "$restart_build" = "no" ]; then
${script_phase_pre_build}
${script_phase_scan}
fi
${script_phase_build}
${script_phase_report}
${script_phase_upload}

0 comments on commit a5e3d34

Please sign in to comment.