3 # This is run from the chroot via fastbulk, which has CDd
4 # into a particular pkgsrc directory and wants us to build it.
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
9 set pkgname = "`bmake show-var VARNAME=PKGNAME`"
10 set logname = $argv[1]
11 if ( -f /usr/pkgsrc/packages/All/${pkgname}.tgz ) then
12 rm -f /tmp/logs/run/$logname
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.
20 foreach i ( `bmake show-var VARNAME=CONFLICTS` )
21 echo "DELETING CONFLICTING PACKAGE: $i"
25 # To ensure a clean build deinstall anything that
26 # may cause our build repackage to fail.
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.
32 bmake deinstall DEINSTALLDEPENDS=ALL SKIP_LICENSE_CHECK=yes
33 bmake repackage clean SKIP_LICENSE_CHECK=yes