fastbulk - Adjustments to fix various issues
[dragonfly.git] / test / fastbulk / dobuild
CommitLineData
b050e616
MD
1#!/bin/csh
2#
3# This is run from the chroot via fastbulk, which has CDd
4# into a particular pkgsrc directory and wants us to build it.
5
6# Nothing to do if the package already exists. Remove the run log
7# to prevent fastbulk from replacing the log from a previous run
8#
9set pkgname = "`bmake show-var VARNAME=PKGNAME`"
10set logname = $argv[1]
11if ( -f /usr/pkgsrc/packages/All/${pkgname}.tgz ) then
12 rm -f /tmp/logs/run/$logname
13 exit 0
14endif
15
16# We have to remove any conflicting packages or the one we
17# are trying to build will refuse to build. Note that we
18# leave the related packages intact.
19#
20foreach i ( `bmake show-var VARNAME=CONFLICTS` )
21 echo "DELETING CONFLICTING PACKAGE: $i"
22 pkg_delete -r "$i"
23end
24
25# To ensure a clean build deinstall anything that
26# may cause our build repackage to fail.
27#
28# Clean after repackaging (if it succeeded) to keep the
29# work topology footprint small. The work topology is
30# left intact for failed builds.
31#
32bmake deinstall DEINSTALLDEPENDS=ALL SKIP_LICENSE_CHECK=yes
33bmake repackage clean SKIP_LICENSE_CHECK=yes
5b966949 34bmake bin-install
b050e616 35exit $status