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

svn at pcbsd.org svn at pcbsd.org
Sat Oct 16 06:04:09 PDT 2010


Author: kris
Date: 2010-10-16 06:04:08 -0700 (Sat, 16 Oct 2010)
New Revision: 7841

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

Fixed handling of MKPORTBEFORE / AFTER



Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager	2010-10-16 12:58:23 UTC (rev 7840)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager	2010-10-16 13:04:08 UTC (rev 7841)
@@ -2840,16 +2840,20 @@
 	echo "${PKGNAME}" >${PBI_PROGDIRPATH}/.keepports
 
 	# Do the same for any OTHERPORTS
-	echo "${PBI_MKPORTBEFORE}" >${PBI_PROGDIRPATH}/.otherports
-	echo "${PBI_MKPORTAFTER}" >>${PBI_PROGDIRPATH}/.otherports
-	while read port
+	for port in ${PBI_MKPORTBEFORE}
 	do
                 if [ ! -d "${PORTSDIR}/${port}" ] ; then continue ; fi
 		get_pkgname "${PORTSDIR}/${port}"
 		echo "${PKGNAME}" >>${PBI_PROGDIRPATH}/.keepports
-        done < ${PBI_PROGDIRPATH}/.otherports
-        rm ${PBI_PROGDIRPATH}/.otherports
+        done
 
+	for port in ${PBI_MKPORTAFTER}
+	do
+                if [ ! -d "${PORTSDIR}/${port}" ] ; then continue ; fi
+		get_pkgname "${PORTSDIR}/${port}"
+		echo "${PKGNAME}" >>${PBI_PROGDIRPATH}/.keepports
+        done
+
 	# Now check what packages we have and prune those whom aren't needed
 	while
 	z="1"
@@ -2895,8 +2899,7 @@
 {
 	if [ -z "${PBI_MKPORTBEFORE}" ] ; then return ; fi
 	
-	echo "${PBI_MKPORTBEFORE}" >${PBI_PROGDIRPATH}/.otherports
-	while read port
+	for port in ${PBI_MKPORTBEFORE}
 	do
 		if [ ! -d "${PORTSDIR}/${port}" ] ; then
 			exit_err "${PORTSDIR}/${port} does not exist!"
@@ -2912,8 +2915,7 @@
 			fi
 			exit_err "make install of ${port} failed!"
 		fi
-	done < ${PBI_PROGDIRPATH}/.otherports
-	rm ${PBI_PROGDIRPATH}/.otherports
+	done
 }
 
 # Make any additional required ports 
@@ -2921,8 +2923,7 @@
 {
 	if [ -z "${PBI_MKPORTAFTER}" ] ; then return ; fi
 	
-	echo "${PBI_MKPORTAFTER}" >${PBI_PROGDIRPATH}/.otherports
-	while read port
+	for port in ${PBI_MKPORTAFTER}
 	do
 		if [ ! -d "${PORTSDIR}/${port}" ] ; then
 			exit_err "${PORTSDIR}/${port} does not exist!"
@@ -2938,8 +2939,7 @@
 			fi
 			exit_err "make install of ${port} failed!"
 		fi
-	done < ${PBI_PROGDIRPATH}/.otherports
-	rm ${PBI_PROGDIRPATH}/.otherports
+	done
 }
 
 # Start pbi_update processing



More information about the Commits mailing list