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

svn at pcbsd.org svn at pcbsd.org
Tue Mar 15 15:12:59 PDT 2011


Author: kris
Date: 2011-03-15 15:12:59 -0700 (Tue, 15 Mar 2011)
New Revision: 9650

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

Do some extra cleanup of ramfs stuff, make sure we remove the directory
completely after a build or failure



Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager	2011-03-15 18:46:42 UTC (rev 9649)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager	2011-03-15 22:12:59 UTC (rev 9650)
@@ -1380,6 +1380,7 @@
 		rm -rf "${PBI_PROGDIRPATH}" >/dev/null 2>/dev/null
 		chflags -R noschg "${PBI_PROGDIRPATH}" >/dev/null 2>/dev/null
 		rm -rf "${PBI_PROGDIRPATH}" >/dev/null 2>/dev/null
+		rm -rf /ramfs/build.$$ >/dev/null 2>/dev/null
 	fi
 	if [ -z "$PBI_CHROOTDIR" ] ; then return ; fi
 	chroot_make_cleanup
@@ -1526,7 +1527,10 @@
 	#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 [ -d "/ramfs" ] ; then 
+		mkdir /ramfs/build.$$
+		echo "WRKDIRPREFIX=/ramfs/build.$$" >> ${MAKE_CONF}
+	fi
 
 
 	if [ ! -z "$PBI_MAKEOPTS" ] ; then
@@ -5542,6 +5546,11 @@
 	# Check if we created a linux app, and need to copy files for it
 	auto_copy_linuxbase
 
+	# Delete the tmp ramfs
+	if [ -d "/ramfs/build.$$" ] ; then
+		rm -rf /ramfs/build.$$ >/dev/null 2>/dev/null
+	fi
+
   	# Break here if we are only doing a build
 	if [ "${PBI_BUILDONLY}" = "YES" ] ; then exit_trap; fi
 



More information about the Commits mailing list