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

svn at pcbsd.org svn at pcbsd.org
Fri Sep 23 08:00:11 PDT 2011


Author: kris
Date: 2011-09-23 08:00:10 -0700 (Fri, 23 Sep 2011)
New Revision: 12966

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

Add support to exclude a specific file from the hashdir inclusion process



Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager	2011-09-23 14:03:53 UTC (rev 12965)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager	2011-09-23 15:00:10 UTC (rev 12966)
@@ -1419,6 +1419,7 @@
 load_pbi_conffile() {
   	if [ ! -d "${PBI_CONFDIR}" ] ; then return 0 ; fi
   	if [ -e "${PBI_CONFDIR}/${PBI_CONFFILE}" ] ; then
+		unset PBI_MAKEPORT PBI_BUILDKEY PBI_PROGVERSION PBI_REQUIRESROOT PBI_PROGNAME PBI_PROGWEB PBI_PROGAUTHOR PBI_PROGICON PBI_MKPORTBEFORE PBI_MKPORTAFTER PBI_MAKEOPTS PBI_EXCLUDELIST PBI_AB_PRIORITY PBI_HASH_EXCLUDES
 		. ${PBI_CONFDIR}/${PBI_CONFFILE}
 	fi
 }
@@ -3243,6 +3244,16 @@
 		strings "${line}" | grep "${PBI_PROGDIRPATH}" >/dev/null 2>/dev/null
 		if [ "$?" = "0" ]; then continue ; fi
 
+		# Check if this hash file is excluded
+		if [ ! -z "${PBI_HASH_EXCLUDES}" ] ; then
+			for _hexcl in ${PBI_HASH_EXCLUDES}
+			do
+				if [ "$_hexcl" = "$line" ] ; then
+					continue
+				fi
+			done
+		fi	
+
 		# Get the file size
 		tSize=`du -k "${line}" | awk '{print $1}'`
 		if [ $(is_num "$tSize") ] ; then 
@@ -5193,7 +5204,7 @@
 	  for pbi in `find . -type f -name "${PBI_CONFFILE}" | grep -v '\.svn' | sort`
 	  do
 		# Figure out the target port for this build
-		unset PBI_MAKEPORT PBI_BUILDKEY PBI_PROGVERSION PBI_REQUIRESROOT PBI_PROGNAME PBI_PROGWEB PBI_PROGAUTHOR PBI_PROGICON PBI_MKPORTBEFORE PBI_MKPORTAFTER PBI_MAKEOPTS PBI_EXCLUDELIST PBI_AB_PRIORITY
+		unset PBI_MAKEPORT PBI_BUILDKEY PBI_PROGVERSION PBI_REQUIRESROOT PBI_PROGNAME PBI_PROGWEB PBI_PROGAUTHOR PBI_PROGICON PBI_MKPORTBEFORE PBI_MKPORTAFTER PBI_MAKEOPTS PBI_EXCLUDELIST PBI_AB_PRIORITY PBI_HASH_EXCLUDES
 		. ${pbi}
 
 		# If we have a PBI already and this one has no version we can continue
@@ -5248,7 +5259,7 @@
 	  # We have something to build lets do it!
 	  if [ "$AB_FOUND" = "1" ] ; then 
 	      pbi="$CUR_WORKING_PBI"
-	      unset PBI_MAKEPORT PBI_BUILDKEY PBI_PROGVERSION PBI_REQUIRESROOT PBI_PROGNAME PBI_PROGWEB PBI_PROGAUTHOR PBI_PROGICON PBI_MKPORTBEFORE PBI_MKPORTAFTER PBI_MAKEOPTS PBI_EXCLUDELIST PBI_AB_PRIORITY
+	      unset PBI_MAKEPORT PBI_BUILDKEY PBI_PROGVERSION PBI_REQUIRESROOT PBI_PROGNAME PBI_PROGWEB PBI_PROGAUTHOR PBI_PROGICON PBI_MKPORTBEFORE PBI_MKPORTAFTER PBI_MAKEOPTS PBI_EXCLUDELIST PBI_AB_PRIORITY PBI_HASH_EXCLUDES
 	      . ${pbi}
 
 	      _cd=$(dirname $pbi | sed 's|./||')



More information about the Commits mailing list