Skip to content

Commit

Permalink
pbulk: Avoid cleaning $prefix on every bulk build in master mode.
Browse files Browse the repository at this point in the history
Whatever is in $prefix shouldn't affect the result -- both scanning
and building happen in the workers -- and it is a bit of a nasty
surprise for merely issuing bulkbuild-restart to nuke all the host's
installed packages.

ok joerg
  • Loading branch information
riastradh committed Jan 2, 2021
1 parent 338d594 commit d2208f8
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions pkgtools/pbulk/files/pbulk/scripts/pre-build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!@SH@
# $NetBSD: pre-build,v 1.15 2020/01/08 15:12:01 joerg Exp $
# $NetBSD: pre-build,v 1.16 2021/01/02 21:54:46 riastradh Exp $
#
# Copyright (c) 2007 Joerg Sonnenberger <[email protected]>.
# All rights reserved.
Expand Down Expand Up @@ -84,7 +84,22 @@ fi

mkdir -p "${bulklog}" "${loc}"

@PREFIX@/libexec/pbulk/client-clean
case "${master_mode}" in
[nN][oO])
# Make sure the prefix is clean before we scan so any
# preinstalled packages don't affect the scanning process.
@PREFIX@/libexec/pbulk/client-clean
;;
[yY][eE][sS])
# Scanning happens in a worker so we don't need to clean the
# prefix here; this way you can run pbulk on a system that has
# packages installed without disrupting those packages.
;;
*)
echo "master_mode must be either yes or no."
exit 1
;;
esac

# Log common settings...
opsys=`cd ${pkgsrc}/pkgtools/pkg_install && ${make} show-var VARNAME=OPSYS`
Expand Down

0 comments on commit d2208f8

Please sign in to comment.