[PC-BSD Commits] r6865 - pcbsd-projects/pbi-manager

svn at pcbsd.org svn at pcbsd.org
Thu Jun 3 14:24:11 PDT 2010


Author: kris
Date: 2010-06-03 14:24:11 -0700 (Thu, 03 Jun 2010)
New Revision: 6865

Modified:
   pcbsd-projects/pbi-manager/pbi-manager
Log:

Fixed some bugs in pbi cleanup at removal time, also start adding glue for pbi updating via pbi_update command



Modified: pcbsd-projects/pbi-manager/pbi-manager
===================================================================
--- pcbsd-projects/pbi-manager/pbi-manager	2010-06-03 16:08:43 UTC (rev 6864)
+++ pcbsd-projects/pbi-manager/pbi-manager	2010-06-03 21:24:11 UTC (rev 6865)
@@ -673,6 +673,7 @@
 	echo -e "`basename ${0}`: ${1}"
 	rm_tmpdir
 	rm_buildfiles
+	clean_wrkdirprefix
 	exit 1
 }
 
@@ -1097,9 +1098,9 @@
 	echo "${PBI_PROGDIRPATH}" >${dir}/pbi_installedpath
 
 	# Remove any duplicate ldconfig entry
-	cat "${PBI_LDCONFIGFILE}" | grep "^${PBI_PROGDIRPATH}" >/dev/null 2>/dev/null
+	cat "${PBI_LDCONFIGFILE}" 2>/dev/null | grep "^${PBI_PROGDIRPATH}" >/dev/null 2>/dev/null
 	if [ "$?" = "0" ] ; then
-		sed -ie "\|^${PBI_PROGDIRPATH}\$|d" ${PBI_LDCONFIGFILE} 2>/dev/null
+		sed -i "\|^${PBI_PROGDIRPATH}\$|d" ${PBI_LDCONFIGFILE} 2>/dev/null
 	fi
 
 	echo "${PBI_PROGDIRPATH}" >>${PBI_LDCONFIGFILE}
@@ -1972,7 +1973,7 @@
 	rm -rf "${PBI_DBDIR}/${PBI_DELETENAME}"
 
 	# Remove the ldconfig entry
-	sed -ie "\|^${PBI_PROGDIRPATH}\$|d" ${PBI_LDCONFIGFILE} 2>/dev/null
+	sed -i "\|^${PBI_PROGDIRPATH}\$|d" ${PBI_LDCONFIGFILE} 2>/dev/null
 }
 
 # Check if we have a preinstall script we need to use
@@ -2209,7 +2210,7 @@
 		"${PBI_UPDATEURL}" >/dev/null 2>/dev/null 
 
 	# Uncomment to see details from update server
-	#cat ${PBI_TMPDIR}/.upcheck$$
+	cat ${PBI_TMPDIR}/.upcheck$$
 	_nver="`cat ${PBI_TMPDIR}/.upcheck$$ | grep 'NewVer: ' | sed 's|NewVer: ||g'`"
 	rm ${PBI_TMPDIR}/.upcheck$$
 
@@ -2227,7 +2228,20 @@
 # Start PBI update process
 do_pbi_update() {
 	if [ "${PBI_DOUPDATE}" != "YES" ]; then return 0 ; fi
+	check_pbi_update "${PBI_UPDATEAPP}" "nodisplay"
+	if [ "$?" != "0" ] ; then exit_err "$PBI_UPDATEAPP - no update available!" ; fi
 
+	
+	# We've gotten this far, now download the updated PBI
+	
+ 	# KPM KPM KPM
+	# Delete the old version, prepare for new
+	pbi_delete "${NO_UPDATEAPP}"
+
+	# Now install new PBI
+	# pbi_add 
+	
+
 }
 
 # start processing autobuild



More information about the Commits mailing list