Subject: pre-build fix of BULKFILESDIR
To: None <pkgsrc-bulk@netbsd.org>
From: None <joerg@britannica.bec.de>
List: pkgsrc-bulk
Date: 11/25/2005 18:22:35
--6c2NcOVqGQ03X4Wi
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi all,
can someone test the attached patch esp. on NetBSD? It should not break
anything, but fix BULKFILESDIR handling on !NetBSD, where bmake would
have been removed in the middle of the bulk build.
Joerg
--6c2NcOVqGQ03X4Wi
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="pre-build.diff"
? pre-build.diff
Index: pre-build
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bulk/pre-build,v
retrieving revision 1.52
diff -u -r1.52 pre-build
--- pre-build 20 Nov 2005 15:25:39 -0000 1.52
+++ pre-build 25 Nov 2005 17:11:46 -0000
@@ -24,6 +24,11 @@
# 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"
@@ -153,8 +158,8 @@
# 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 +267,20 @@
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
--6c2NcOVqGQ03X4Wi--