summaryrefslogtreecommitdiff
path: root/mk/bulk
diff options
context:
space:
mode:
authorkristerw <kristerw@pkgsrc.org>2005-03-30 20:21:07 +0000
committerkristerw <kristerw@pkgsrc.org>2005-03-30 20:21:07 +0000
commitd02022eaeca74f7530db28c5594c3a4be2c63836 (patch)
tree66dd3ce84be0dbc710c1c9b1b1f71783fd33856d /mk/bulk
parentbd9db3605a75ebf85b3f050741dc7a155f4bb41e (diff)
downloadpkgsrc-d02022eaeca74f7530db28c5594c3a4be2c63836.tar.gz
Remove the packages added when pruning files etc. before starting
the real bulk build. This ensures that the bulk build is started in a consistent state, regardless of how the pre-build things are configured.
Diffstat (limited to 'mk/bulk')
-rw-r--r--mk/bulk/pre-build18
1 files changed, 17 insertions, 1 deletions
diff --git a/mk/bulk/pre-build b/mk/bulk/pre-build
index 663481f9dbf..0e2d5201e1e 100644
--- a/mk/bulk/pre-build
+++ b/mk/bulk/pre-build
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: pre-build,v 1.45 2005/03/29 00:55:50 hubertf Exp $
+# $NetBSD: pre-build,v 1.46 2005/03/30 20:21:07 kristerw Exp $
#
# Clean up system to be ready for bulk pkg build
#
@@ -246,6 +246,22 @@ yes|YES)
;;
esac
+# Clean out the packages added above so that the real bulk build
+# is started in a consistent state.
+for dbdir in ${PKG_DBDIR} ${DEPOTBASE}; do
+ echo Removing all installed packages in $dbdir
+ if [ -d $dbdir ]; then
+ cd $dbdir
+ for pkg in *
+ do
+ if `pkg_info -K $dbdir -qe $pkg`; then
+ echo pkg_delete -r $pkg
+ pkg_delete -K $dbdir -r $pkg
+ fi
+ done
+ fi
+done
+
# on non-NetBSD, we don't want these to build as they overwrite
# bootstrap-pkgsrc generated files and thus would break the following builds.