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

svn at pcbsd.org svn at pcbsd.org
Tue Dec 21 12:22:24 PST 2010


Author: kris
Date: 2010-12-21 12:22:24 -0800 (Tue, 21 Dec 2010)
New Revision: 8248

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

Few fixes:
 * When doing autobuilds and making patch files don't stop the whole process when a patch fails
 * Make sure we sign patches when doing auto-builds
 * Append patching details to the log



Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager	2010-12-21 18:14:51 UTC (rev 8247)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager	2010-12-21 20:22:24 UTC (rev 8248)
@@ -4235,14 +4235,14 @@
 			cp "${_cd}/pbi-descr" "${_od}/pbi-descr"
 		fi
 
-		rm "${_od}/build.log.bz2" >/dev/null 2>/dev/null
-		bzip2 "${_od}/build.log"
-
 		# Generate patch files to the new version of this PBI
 		if [ "$PBI_AB_GENPATCH" = "YES" -a -d "${_od}/archived" ] ; then
-			gen_pbi_patches "${_od}" "${_od}/archived"
+			gen_pbi_patches "${_od}" "${_od}/archived" >>${_od}/build.log 2>>${_od}/build.log
 		fi
 
+		rm "${_od}/build.log.bz2" >/dev/null 2>/dev/null
+		bzip2 "${_od}/build.log"
+
 	else
 		echo "Failed" > "${_od}/pbi-result"
 		if [ ! -z "${PBI_AB_HELPS}" ] ; then
@@ -4262,13 +4262,24 @@
 	# First remove any old patches
 	rm ${_curPBIdir}/*.pbp 2>/dev/null
 
+	# Make sure to enable signing of the patch files
+	if [ ! -z "${PBI_AB_SSLPRIVKEY}" ] ; then
+        	local _mpflags="-o $_curPBIdir --sign ${PBI_AB_SSLPRIVKEY}"
+	else
+		local _mpflags="-o $_curPBIdir"
+       	fi
+
 	# Build a list of old PBIs we need to make patches from
 	for _oPBI in `ls ${_oldPBIdir}/*.pbi 2>/dev/null`
 	do
 		# Make sure we don't try to make a patch of identical files
 	  	if [ "`basename $_oPBI`" != "`basename $_curPBI`" ] ; then	
 			echo "Building pbp patch of ${_oPBI} -> ${_curPBI}"
-			make_pbi_patchfile "$_curPBI" "$_oPBI" "$_curPBIdir"
+			pbi_makepatch $_mpflags "$_oPBI" "$_curPBI" 
+			if [ "$?" != "0" ] ; then
+				echo "pbi_makepatch: Failed creating patchfile for $_oPBI -> $_curPBI"
+			fi
+		 	
 		fi
 	done
 }



More information about the Commits mailing list