diff options
author | riastradh <riastradh@pkgsrc.org> | 2021-01-02 21:54:46 +0000 |
---|---|---|
committer | riastradh <riastradh@pkgsrc.org> | 2021-01-02 21:54:46 +0000 |
commit | 91d1bd2b726a5bb836ded3ff76775547bf83f34e (patch) | |
tree | efd1b9eebd453a461369ad8eb99001f22ceaf8f0 /pkgtools | |
parent | 0ccf757b98f7bfd2ee983156294386e00a5f210b (diff) | |
download | pkgsrc-91d1bd2b726a5bb836ded3ff76775547bf83f34e.tar.gz |
pbulk: Avoid cleaning $prefix on every bulk build in master mode.
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
Diffstat (limited to 'pkgtools')
-rwxr-xr-x | pkgtools/pbulk/files/pbulk/scripts/pre-build | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/pkgtools/pbulk/files/pbulk/scripts/pre-build b/pkgtools/pbulk/files/pbulk/scripts/pre-build index ed9b3e714ab..181d277aadf 100755 --- a/pkgtools/pbulk/files/pbulk/scripts/pre-build +++ b/pkgtools/pbulk/files/pbulk/scripts/pre-build @@ -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 <joerg@NetBSD.org>. # All rights reserved. @@ -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` |