[PC-BSD Commits] r9648 - pcbsd/current/src-sh/pbi-manager

svn at pcbsd.org svn at pcbsd.org
Tue Mar 15 11:22:06 PDT 2011


Author: kris
Date: 2011-03-15 11:22:06 -0700 (Tue, 15 Mar 2011)
New Revision: 9648

Modified:
   pcbsd/current/src-sh/pbi-manager/pbi-manager
Log:

Added support to building ports within a memory file-system to speed up the process
on large build systems



Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager	2011-03-15 16:51:33 UTC (rev 9647)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager	2011-03-15 18:22:06 UTC (rev 9648)
@@ -1520,13 +1520,15 @@
 	echo "PREFIX=${PREFIX}" >> ${MAKE_CONF}
 	echo "LOCALBASE=${PREFIX}" >> ${MAKE_CONF}
 	echo "PACKAGE_BUILDING=yes" >> ${MAKE_CONF}
-	#echo "LDFLAGS+=-L${PREFIX}/lib" >> ${MAKE_CONF}
-
 	echo "BATCH=yes" >> ${MAKE_CONF}
 	echo "NO_IGNORE=yes" >> ${MAKE_CONF}
 	echo "PACKAGE_BUILDING=yes" >> ${MAKE_CONF}
+	#echo "LDFLAGS+=-L${PREFIX}/lib" >> ${MAKE_CONF}
 
+	# If a ramfs dir is present, lets use it
+	if [ -d "/ramfs" ] ; then echo "WRKDIRPREFIX=/ramfs" >> ${MAKE_CONF} ; fi
 
+
 	if [ ! -z "$PBI_MAKEOPTS" ] ; then
 		# Check if we have custom make opts
 		echo "${PBI_MAKEOPTS}" >> ${MAKE_CONF}
@@ -5567,6 +5569,7 @@
 	umount ${PBI_CHROOTDIR}/dev >/dev/null 2>/dev/null
 	umount ${PBI_CHROOTDIR}/compat/linux/proc >/dev/null 2>/dev/null
 	umount ${PBI_CHROOTDIR}/usr/ports/distfiles >/dev/null 2>/dev/null
+	umount ${PBI_CHROOTDIR}/ramfs >/dev/null 2>/dev/null
 	rm -rf "${PBI_CHROOTDIR}" >/dev/null 2>/dev/null
 	chflags -R noschg ${PBI_CHROOTDIR} >/dev/null 2>/dev/null
 	rm -rf "${PBI_CHROOTDIR}" >/dev/null 2>/dev/null
@@ -5601,6 +5604,12 @@
 		mkdir -p ${PORTSDIR}/distfiles
 	fi
 	mount_nullfs ${PORTSDIR}/distfiles ${PBI_CHROOTDIR}/usr/ports/distfiles
+	
+	# Check if the ramfs dir exists, and if so mount it for fast port building
+	if [ -d "${PBI_APPDIR}/ramfs" ] ; then
+		mkdir ${PBI_CHROOTDIR}/ramfs
+		mount_nullfs ${PBI_APPDIR}/ramfs ${PBI_CHROOTDIR}/ramfs
+	fi
 
 	# Now copy over the pbi_* scripts
 	mkdir ${PBI_CHROOTDIR}/usr/local/sbin



More information about the Commits mailing list