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

svn at pcbsd.org svn at pcbsd.org
Tue Aug 14 11:49:13 PDT 2012


Author: kris
Date: 2012-08-14 18:49:12 +0000 (Tue, 14 Aug 2012)
New Revision: 18442

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

When we use --tmpfs for PBI builds, now create the entire chroot dir in
tmpfs, instead of just the WRKDIR. This takes more ram, but can further
speed up the build process, by doing ALL the PBI operations in memory. 



Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager	2012-08-14 16:39:20 UTC (rev 18441)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager	2012-08-14 18:49:12 UTC (rev 18442)
@@ -1629,14 +1629,9 @@
 	echo "NO_IGNORE=yes" >> ${MAKE_CONF}
 	echo "PACKAGE_BUILDING=yes" >> ${MAKE_CONF}
 
-	# 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
+	mkdir /usr/wrkdirprefix
+	echo "WRKDIRPREFIX=/usr/wrkdirprefix" >> ${MAKE_CONF}
+	echo "DEPENDS_CLEAN=YES" >> ${MAKE_CONF}
 
 	if [ -n "$PBI_MAKEOPTS" ] ; then
 		# Check if we have custom make opts
@@ -6379,9 +6374,9 @@
 	umount -f ${PBI_CHROOTDIR}/dev >/dev/null 2>/dev/null
 	umount -f ${PBI_CHROOTDIR}/compat/linux/proc >/dev/null 2>/dev/null
 	umount -f ${PBI_CHROOTDIR}/usr/ports >/dev/null 2>/dev/null
-	umount -f ${PBI_CHROOTDIR}/tmpfs >/dev/null 2>/dev/null
 	umount -f ${PBI_CHROOTDIR}/pkgs >/dev/null 2>/dev/null
 	umount -f ${PBI_CHROOTDIR}/.ccache >/dev/null 2>/dev/null
+	umount -f ${PBI_CHROOTDIR} >/dev/null 2>/dev/null
 
 	if [ "${PBI_KEEPBUILDFILES}" = "YES" ] ; then return ; fi
 	rm -rf "${PBI_CHROOTDIR}" >/dev/null 2>/dev/null
@@ -6402,7 +6397,14 @@
 	# See if there is old chroot to clean first
 	chroot_make_cleanup
 
+	# Create the new chroot dir
 	mkdir -p "${PBI_CHROOTDIR}"
+
+	# If we plan on using TMPFS mount it now
+	if [ "$MKTMPFS" = "YES" ] ; then 
+		mount -t tmpfs tmpfs ${PBI_CHROOTDIR}
+	fi
+
 	echo "Extracting chroot environment..."
 	tar xvf ${PBI_CHROOTFILE} -C "${PBI_CHROOTDIR}" >/dev/null 2>/dev/null
 	[ $? -ne 0 ] && exit_err "Failed extracting chroot environment!"
@@ -6423,12 +6425,6 @@
 	mkdir -p ${PBI_CHROOTDIR}/usr/ports 2>/dev/null
 	mount_nullfs ${PORTSDIR} ${PBI_CHROOTDIR}/usr/ports
 
-	# Using tmpfs?
-	if [ "$MKTMPFS" = "YES" ] ; then 
-		mkdir ${PBI_CHROOTDIR}/tmpfs
-		mount -t tmpfs tmpfs ${PBI_CHROOTDIR}/tmpfs
-	fi
-
 	# Are we doing pkg caching?
 	if [ "$PBI_PKGCACHE" = "YES" ] ; then
 		mkdir ${PBI_CHROOTDIR}/pkgs



More information about the Commits mailing list