[PC-BSD Commits] r7936 - pcbsd/current/src-sh/pc-metapkgmanager

svn at pcbsd.org svn at pcbsd.org
Thu Oct 28 12:53:27 PDT 2010


Author: kris
Date: 2010-10-28 12:53:26 -0700 (Thu, 28 Oct 2010)
New Revision: 7936

Modified:
   pcbsd/current/src-sh/pc-metapkgmanager/pc-metapkgmanager
Log:

Updated pc-metapkgmanager, return 1 if some packages fail to be installed



Modified: pcbsd/current/src-sh/pc-metapkgmanager/pc-metapkgmanager
===================================================================
--- pcbsd/current/src-sh/pc-metapkgmanager/pc-metapkgmanager	2010-10-28 19:38:41 UTC (rev 7935)
+++ pcbsd/current/src-sh/pc-metapkgmanager/pc-metapkgmanager	2010-10-28 19:53:26 UTC (rev 7936)
@@ -71,9 +71,11 @@
 		if [ "$loc" = "NET" ] ; then
 			PACKAGESITE="$2" ; export PACKAGESITE
 			pkg_add -f -r "$pkg" >/dev/null 2>/dev/null
+			if [ "$?" != "0" ] ; then _pkgStatus=1 ; fi
 		else
 			cd "${2}"
 			pkg_add -f "${pkg}.tbz" >/dev/null 2>/dev/null
+			if [ "$?" != "0" ] ; then _pkgStatus=1 ; fi
 		fi
         done < ${MPDIR}/${_apkg}/pkg-list
 
@@ -248,6 +250,9 @@
 	get_num_pkgs "$1"
 	echo "Pending Meta-Package changes: $VAL"
 
+	# Set the package add exit status to default of 0
+	_pkgStatus=0
+
  	local list
 	list=`echo "$1" | sed 's|,| |g'`	
 	for z in $list
@@ -257,6 +262,7 @@
 	done
 
 	echo "Meta-Package changes finished!"
+	exit "$_pkgStatus"
 
 }
 



More information about the Commits mailing list