diff options
author | joerg <joerg> | 2008-01-26 01:57:00 +0000 |
---|---|---|
committer | joerg <joerg> | 2008-01-26 01:57:00 +0000 |
commit | acf8bb9a764096ca06e6f958359afbdd1376a132 (patch) | |
tree | f23ad29235d0d5b2905b72e5479a1bd2b43994ce /pkgtools | |
parent | 43f1bcc5f05a2ff2b5b349612c80172b2e7acb78 (diff) | |
download | pkgsrc-acf8bb9a764096ca06e6f958359afbdd1376a132.tar.gz |
pbulk-0.25:
Add bulkbuild-rebuild which can be used to build packages individually.
It assumes that all dependencies are built and the results of the scan
phase exists. That means it can be used after a bulk build to try to
rebuild a failing package. Fixes PR 37407.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pbulk/Makefile | 6 | ||||
-rw-r--r-- | pkgtools/pbulk/PLIST | 3 | ||||
-rw-r--r-- | pkgtools/pbulk/files/pbulk/scripts/Makefile | 13 | ||||
-rwxr-xr-x | pkgtools/pbulk/files/pbulk/scripts/bulkbuild-rebuild | 49 |
4 files changed, 61 insertions, 10 deletions
diff --git a/pkgtools/pbulk/Makefile b/pkgtools/pbulk/Makefile index e3bbac00a4a..2e4a5cd15d6 100644 --- a/pkgtools/pbulk/Makefile +++ b/pkgtools/pbulk/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.31 2008/01/26 00:34:57 joerg Exp $ +# $NetBSD: Makefile,v 1.32 2008/01/26 01:57:00 joerg Exp $ -DISTNAME= pbulk-0.24 +DISTNAME= pbulk-0.25 CATEGORIES= pkgtools MASTER_SITES= # empty DISTFILES= # empty @@ -34,7 +34,7 @@ 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/client-clean \ + scripts/bulkbuild scripts/bulkbuild-rebuild 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 \ diff --git a/pkgtools/pbulk/PLIST b/pkgtools/pbulk/PLIST index 4d6d6373cf4..e083d26328b 100644 --- a/pkgtools/pbulk/PLIST +++ b/pkgtools/pbulk/PLIST @@ -1,5 +1,6 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 2007/06/19 19:49:55 joerg Exp $ +@comment $NetBSD: PLIST,v 1.2 2008/01/26 01:57:00 joerg Exp $ bin/bulkbuild +bin/bulkbuild-rebuild bin/pbulk-build bin/pbulk-resolve bin/pbulk-scan diff --git a/pkgtools/pbulk/files/pbulk/scripts/Makefile b/pkgtools/pbulk/files/pbulk/scripts/Makefile index 0e5e993dcdc..a49ed05d5e4 100644 --- a/pkgtools/pbulk/files/pbulk/scripts/Makefile +++ b/pkgtools/pbulk/files/pbulk/scripts/Makefile @@ -1,13 +1,14 @@ -# $NetBSD: Makefile,v 1.1.1.1 2007/06/19 19:49:59 joerg Exp $ +# $NetBSD: Makefile,v 1.2 2008/01/26 01:57:00 joerg Exp $ -SCRIPTS= build build-client-start bulkbuild client-clean \ - pkg-build pkg-up-to-date pre-build report scan \ - scan-client-start upload \ +SCRIPTS= build build-client-start bulkbuild bulkbuild-rebuild \ + client-clean pkg-build pkg-up-to-date pre-build report \ + scan scan-client-start upload \ compute-packages.awk create-broken-graph.awk \ create-report-html.awk create-report-txt.awk \ create-report.awk -SCRIPTSDIR= ${PREFIX}/libexec/pbulk -SCRIPTSDIR_bulkbuild= ${PREFIX}/bin +SCRIPTSDIR= ${PREFIX}/libexec/pbulk +SCRIPTSDIR_bulkbuild= ${PREFIX}/bin +SCRIPTSDIR_bulkbuild-rebuild= ${PREFIX}/bin .include <bsd.prog.mk> diff --git a/pkgtools/pbulk/files/pbulk/scripts/bulkbuild-rebuild b/pkgtools/pbulk/files/pbulk/scripts/bulkbuild-rebuild new file mode 100755 index 00000000000..29ebf33d00d --- /dev/null +++ b/pkgtools/pbulk/files/pbulk/scripts/bulkbuild-rebuild @@ -0,0 +1,49 @@ +#!@SH@ +# $NetBSD: bulkbuild-rebuild,v 1.1 2008/01/26 01:57:00 joerg Exp $ + +. @PBULK_CONFIG@ + +set -e + +check_pkg() { + found=0 + while read line; do + if [ "$line" = "PKGNAME=$1" ]; then + return 0 + fi + done < ${loc}/presolve + echo "Package $1 not found, aborting." + exit 1 +} + +pkg_failed() { + echo "failed" + exit 1 +} + +build_pkg() { + printf "Building package %s... " "$1" + do_print=0 + while read line; do + case "$line" in + "PKGNAME=$1") + do_print=1 + ;; + "PKGNAME="*) + do_print=0 + ;; + esac + [ "$do_print" = 1 ] && echo "$line" + done < ${loc}/presolve | ${pbuild_script} || pkg_failed "$1" + echo "done" +} + +if [ $# = 0 ]; then + echo "Usage: $0 package ..." +fi + +while [ $# != 0 ]; do + check_pkg "$1" + build_pkg "$1" + shift +done |