summaryrefslogtreecommitdiff
path: root/mk/bulk/pre-build
diff options
context:
space:
mode:
authortv <tv@pkgsrc.org>2005-01-19 20:58:00 +0000
committertv <tv@pkgsrc.org>2005-01-19 20:58:00 +0000
commit32a5800ef544f9f0b7db488439033c34c6bf6ab3 (patch)
treefc22ff3e8c131365552030275038f577d133ebf1 /mk/bulk/pre-build
parent8cc99821fe89ece43776f14fbe1f1e8d7f0b4476 (diff)
downloadpkgsrc-32a5800ef544f9f0b7db488439033c34c6bf6ab3.tar.gz
* Add USE_BULK_TIMESTAMPS (default "yes") to control whether dependency
binpkg timestamps, and ${PKGDIR} file timestamps, will be used to determine if a rebuild is necessary. If changed to "no", then rebuilds will only happen when PKGNAME actually changes. * Add LINTPKGSRC_DB (and companion USE_LINTPKGSRC_CACHE, default "no") to make pre-build generate a reusable database with "lintpkgsrc -E"; helps with nfs-mounted pkgsrc. A future change will allow use of this in the upload script. * Add entry for PRUNEPACKAGES in build.conf-example (this was missing).
Diffstat (limited to 'mk/bulk/pre-build')
-rw-r--r--mk/bulk/pre-build32
1 files changed, 27 insertions, 5 deletions
diff --git a/mk/bulk/pre-build b/mk/bulk/pre-build
index fa7f739a014..121d89dcc4c 100644
--- a/mk/bulk/pre-build
+++ b/mk/bulk/pre-build
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: pre-build,v 1.43 2005/01/18 15:04:34 tv Exp $
+# $NetBSD: pre-build,v 1.44 2005/01/19 20:58:01 tv Exp $
#
# Clean up system to be ready for bulk pkg build
#
@@ -40,6 +40,11 @@ if [ "$BLDLOG" = "" ]; then
echo "Had problems determining the name of the .make files"
exit 1
fi
+LINTPKGSRC_DB=`( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} show-var VARNAME=LINTPKGSRC_DB )`;
+if [ "$LINTPKGSRC_DB" = "" ]; then
+ echo "Had problems determining the name of the .lintpkgsrc.db file"
+ exit 1
+fi
STARTFILE=`( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} show-var VARNAME=STARTFILE )`;
if [ "$STARTFILE" = "" ]; then
echo "Had problems determining the name of the .start file"
@@ -171,11 +176,29 @@ fi
DISTDIR=`( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} show-var VARNAME=DISTDIR )`;
PACKAGES=`( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} show-var VARNAME=PACKAGES )`;
+case "$LINTPKGSRC_CACHE$PRUNEDISTFILES$PRUNEPACKAGES" in
+*yes*|*YES*)
+ # install pkglint to support any of these options
+ ( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} PRECLEAN=yes bulk-install )
+ ;;
+esac
+
+case "$LINTPKGSRC_CACHE" in
+yes|YES)
+ echo "Creating lintpkgsrc cache database."
+ lintpkgsrc -K $PACKAGES -P $USR_PKGSRC -M $DISTDIR -E $LINTPKGSRC_DB
+ lintpkgsrc_cache="-I $LINTPKGSRC_DB"
+ echo done.
+ ;;
+*)
+ lintpkgsrc_cache=''
+ ;;
+esac
+
case "$PRUNEDISTFILES" in
yes|YES)
echo "Removing old/broken distfiles"
- ( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} PRECLEAN=yes bulk-install )
- lintpkgsrc -K $PACKAGES -P $USR_PKGSRC -M $DISTDIR -o -m -r
+ lintpkgsrc $lintpkgsrc_cache -K $PACKAGES -P $USR_PKGSRC -M $DISTDIR -o -m -r
echo done.
;;
*)
@@ -186,8 +209,7 @@ esac
case "$PRUNEPACKAGES" in
yes|YES)
echo "Removing old (out of date) binary packages"
- ( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} PRECLEAN=yes bulk-install )
- lintpkgsrc -K $PACKAGES -P $USR_PKGSRC -M $DISTDIR -p -r
+ lintpkgsrc $lintpkgsrc_cache -K $PACKAGES -P $USR_PKGSRC -M $DISTDIR -p -r
echo done.
;;
*)