pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pbulk/files/pbulk/scripts pbulk: Avoid cleani...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c187882c8b13
branches:  trunk
changeset: 444086:c187882c8b13
user:      riastradh <riastradh%pkgsrc.org@localhost>
date:      Sat Jan 02 21:54:46 2021 +0000

description:
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:

 pkgtools/pbulk/files/pbulk/scripts/pre-build |  19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r 0b9ed7e1b460 -r c187882c8b13 pkgtools/pbulk/files/pbulk/scripts/pre-build
--- a/pkgtools/pbulk/files/pbulk/scripts/pre-build      Sat Jan 02 21:39:15 2021 +0000
+++ b/pkgtools/pbulk/files/pbulk/scripts/pre-build      Sat Jan 02 21:54:46 2021 +0000
@@ -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@localhost>.
 # All rights reserved.
@@ -84,7 +84,22 @@
 
 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`



Home | Main Index | Thread Index | Old Index