summaryrefslogtreecommitdiff
path: root/mk/bulk/pre-build
diff options
context:
space:
mode:
authorjoerg <joerg>2005-11-30 17:31:06 +0000
committerjoerg <joerg>2005-11-30 17:31:06 +0000
commit4a663bce6975fbf8ba08f9d1c4b5bd99ff36a1b6 (patch)
treee028c1aba67a39f280afe9c64ee28a4e0549706b /mk/bulk/pre-build
parent8831e1104bf0334339e0dfed4ec4f296e26a3338 (diff)
downloadpkgsrc-4a663bce6975fbf8ba08f9d1c4b5bd99ff36a1b6.tar.gz
Fix usage of BULKFILESDIR:
1. Ensure that it exists before trying to use anything inside of it. 2. Prefix files correctly with BULKFILESDIR to match the rest of the tree. 3. Most importantly, create the .broken.html files for bootstrap tools in BULKFILESDIR, otherwise e.g. bmake would be removed in the middle of a bulk build on non-NetBSD. Discussed-with: rillig@
Diffstat (limited to 'mk/bulk/pre-build')
-rw-r--r--mk/bulk/pre-build22
1 files changed, 16 insertions, 6 deletions
diff --git a/mk/bulk/pre-build b/mk/bulk/pre-build
index ff0d5cb1e10..4ad9b0ad128 100644
--- a/mk/bulk/pre-build
+++ b/mk/bulk/pre-build
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: pre-build,v 1.52 2005/11/20 15:25:39 rillig Exp $
+# $NetBSD: pre-build,v 1.53 2005/11/30 17:31:06 joerg Exp $
#
# Clean up system to be ready for bulk pkg build
#
@@ -24,6 +24,11 @@ PKGLINT_PKG_DIR=${USR_PKGSRC}/pkgtools/pkglint
# Extract the name of the files used for the build log and broken build log.
# These have defaults set by bsd.bulk-pkg.mk and may be overridden in
# /etc/mk.conf
+BULKFILESDIR=`( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} show-var VARNAME=BULKFILESDIR )`;
+if [ "$BULKFILESDIR" = "" ]; then
+ echo "Had problems determining the directory of .broken* files"
+ exit 1
+fi
BROKENF=`( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} show-var VARNAME=BROKENFILE )`;
if [ "$BROKENF" = "" ]; then
echo "Had problems determining the name of the .broken files"
@@ -54,6 +59,10 @@ LOCALBASE=`( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} show-var VARNAME=LOCALBASE )`;
X11BASE=`( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} show-var VARNAME=X11BASE )`;
DISTDIR=`( cd ${PKGLINT_PKG_DIR} ; ${BMAKE} show-var VARNAME=DISTDIR )`;
+# Create ${BULKFILESDIR} if necessary
+echo "Creating ${BULKFILESDIR} if necessary"
+mkdir -p "${BULKFILESDIR}"
+
# Make sure the pkg-vulnerabilities file is up to date
echo "Making sure vulnerability-list is upto date:"
if [ -z "$UPDATE_VULNERABILITY_LIST" -o "$UPDATE_VULNERABILITY_LIST" = yes ]; then
@@ -153,8 +162,8 @@ rm -fr /tmp/mod*
# Clean up state files
cd ${USR_PKGSRC}
echo "Cleaning up leftover state files from previous runs"
-rm -f */*/$BROKENF */*/$BRKWRKLOG */*/$BLDLOG
-rm -f $BROKENF $BRKWRKLOG $BLDLOG $STARTFILE
+rm -f "${BULKFILESDIR}"/*/*/"$BROKENF" "${BULKFILESDIR}"/*/*/"$BRKWRKLOG" "${BULKFILESDIR}"/*/*/"$BLDLOG"
+rm -f "${BULKFILESDIR}/$BROKENF" "${BULKFILESDIR}/$BRKWRKLOG" "${BULKFILESDIR}/$BLDLOG" "$STARTFILE"
@@ -262,19 +271,20 @@ for dbdir in ${PKG_DBDIR} ${DEPOTBASE}; do
fi
done
-cd ${USR_PKGSRC}
-
# on non-NetBSD, we don't want these to build as they overwrite
# bootstrap-pkgsrc generated files and thus would break the following builds.
if [ x"$BMAKE" = x"bmake" ]; then
for pkg in archivers/pax devel/bmake devel/mk-files net/tnftp \
security/kth-krb4 textproc/nbsed; do
+ mkdir -p "${BULKFILESDIR}/${pkg}"
echo "Don't blow away bootstrap-pkgsrc stuff!" > \
- ${pkg}/${BROKENF}
+ "${BULKFILESDIR}/${pkg}/${BROKENF}"
done
fi
+cd ${USR_PKGSRC}
+
if [ -f mk/bulk/pre-build.local ]; then
export BROKENF
. mk/bulk/pre-build.local