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

svn at pcbsd.org svn at pcbsd.org
Wed Oct 12 12:11:51 PDT 2011


Author: kris
Date: 2011-10-12 12:11:51 -0700 (Wed, 12 Oct 2011)
New Revision: 13322

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

Speedup builds by using mount_nullfs instead of copying ports tree with each build



Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager	2011-10-12 18:52:49 UTC (rev 13321)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager	2011-10-12 19:11:51 UTC (rev 13322)
@@ -1570,10 +1570,13 @@
 	echo "NO_IGNORE=yes" >> ${MAKE_CONF}
 	echo "PACKAGE_BUILDING=yes" >> ${MAKE_CONF}
 
-	# If we plan on using TMPFS mount it now
+	# If we plan on using TMPFS set it now
 	if [ "$MKTMPFS" = "YES" ] ; then 
 		echo "WRKDIRPREFIX=/tmpfs" >> ${MAKE_CONF}
 		echo "DEPENDS_CLEAN=YES" >> ${MAKE_CONF}
+	else
+		mkdir /usr/wrkdirprefix
+		echo "WRKDIRPREFIX=/usr/wrkdirprefix" >> ${MAKE_CONF}
 	fi
 
 	if [ ! -z "$PBI_MAKEOPTS" ] ; then
@@ -6011,7 +6014,7 @@
 	echo "Cleaning $PBI_CHROOTDIR"
 	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}/usr/ports >/dev/null 2>/dev/null
 	umount ${PBI_CHROOTDIR}/tmpfs >/dev/null 2>/dev/null
 	rm -rf "${PBI_CHROOTDIR}" >/dev/null 2>/dev/null
 	chflags -R noschg ${PBI_CHROOTDIR} >/dev/null 2>/dev/null
@@ -6038,15 +6041,16 @@
 		exit_err "Failed extracting chroot environment!"
 	fi
 
-	echo "Copying ${PORTSDIR} -> ${PBI_CHROOTDIR}/usr/ports"
+	# Copy resolv.conf
 	cp /etc/resolv.conf ${PBI_CHROOTDIR}/etc/resolv.conf
-	mkdir -p ${PBI_CHROOTDIR}/usr/ports
-	tar cvf - -C "${PORTSDIR}" --exclude ./distfiles . 2>/dev/null | tar xvf - -C "${PBI_CHROOTDIR}/usr/ports" 2>/dev/null
-	mkdir -p ${PBI_CHROOTDIR}/usr/ports/distfiles
+
+	#echo "Copying ${PORTSDIR} -> ${PBI_CHROOTDIR}/usr/ports"
+	#tar cvf - -C "${PORTSDIR}" --exclude ./distfiles . 2>/dev/null | tar xvf - -C "${PBI_CHROOTDIR}/usr/ports" 2>/dev/null
 	if [ ! -d "${PORTSDIR}/distfiles" ] ; then
 		mkdir -p ${PORTSDIR}/distfiles
 	fi
-	mount_nullfs ${PORTSDIR}/distfiles ${PBI_CHROOTDIR}/usr/ports/distfiles
+	mkdir -p ${PBI_CHROOTDIR}/usr/ports
+	mount_nullfs ${PORTSDIR} ${PBI_CHROOTDIR}/usr/ports
 
 	if [ "$MKTMPFS" = "YES" ] ; then 
 		mkdir ${PBI_CHROOTDIR}/tmpfs



More information about the Commits mailing list