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

svn at pcbsd.org svn at pcbsd.org
Tue Aug 3 05:38:41 PDT 2010


Author: kris
Date: 2010-08-03 05:38:41 -0700 (Tue, 03 Aug 2010)
New Revision: 7334

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

Fixed some more bugs with dbus support, don't make wrapper files for library files which happen to be set to executable



Modified: pcbsd-projects/pbi-manager/pbi-manager
===================================================================
--- pcbsd-projects/pbi-manager/pbi-manager	2010-08-02 21:58:36 UTC (rev 7333)
+++ pcbsd-projects/pbi-manager/pbi-manager	2010-08-03 12:38:41 UTC (rev 7334)
@@ -1472,9 +1472,9 @@
 	fi
 
 	# Start making the wrapper script
-	echo "#!/bin/sh" > ${PBI_STAGEDIR}/${fbin}
-	echo "PROGDIR=\"%%PBI_APPDIR%%\" ; export PROGDIR" >>${PBI_STAGEDIR}/${fbin}
-	echo "PROGBIN=\"${bin}\" ; export PROGBIN" >>${PBI_STAGEDIR}/${fbin}
+	echo "#!/bin/sh" > ${dir}/${fbin}
+	echo "PROGDIR=\"%%PBI_APPDIR%%\" ; export PROGDIR" >>${dir}/${fbin}
+	echo "PROGBIN=\"${bin}\" ; export PROGBIN" >>${dir}/${fbin}
 
 	# Start the main code block
 	echo 'PATH="${PROGDIR}/bin:${PROGDIR}/sbin:${PROGDIR}/libexec:$PATH"; export PATH
@@ -1511,7 +1511,7 @@
 LD_32_LIBRARY_PATH="${LDCONFIGDIRS}:${PROGDIR}/lib/:${PROGDIR}/kde4/lib:${PROGDIR}/lib/qt4"
 export LD_LIBRARY_PATH LD_32_LIBRARY_PATH
 
-'>>${PBI_STAGEDIR}/${fbin}
+'>>${dir}/${fbin}
 
 	# See if we need the crash-handler
 	if [ "$ch" = "YES" ] ; then
@@ -1522,10 +1522,10 @@
 | tee $STDLOG) 3>&1 1>&2 2>&3 | tee $STELOG) 3>&1 1>&2 2>&3)
 
 rm $STDLOG >/dev/null 2>/dev/null
-rm $STELOG >/dev/null 2>/dev/null' >>${PBI_STAGEDIR}/${fbin}
+rm $STELOG >/dev/null 2>/dev/null' >>${dir}/${fbin}
 
 	else
-		echo '${PROGDIR}/${PROGBIN}  "$@"' >>${PBI_STAGEDIR}/${fbin}
+		echo '${PROGDIR}/${PROGBIN}  "$@"' >>${dir}/${fbin}
 	fi		
 }
 
@@ -2698,8 +2698,13 @@
 		if [ -z "${f}" ] ; then continue ; fi 
 		if [ ! -e "${PBI_PROGDIRPATH}/${f}" ] ; then continue ; fi 
 
+		# See if this is executable and set it as binary
 		if [ -x "${PBI_PROGDIRPATH}/${f}" ]; then bin="YES" ; fi
 
+		# Make sure this isn't a library file
+		file "${PBI_PROGDIRPATH}/${f}" 2>/dev/null | grep "shared object" >/dev/null 2>/dev/null
+		if [ "$?" = "0" ] ; then bin="NO" ; fi 
+
 		# If we are working on a binary, mark it as such
 		if  [ "$bin" = "YES" ] ; then
 			echo "${f}	${f}	binary" >> "$_ef"
@@ -2738,10 +2743,9 @@
 				fi
 
 				# Massage the service file to point to the fakebin wrapper
-				rmBaseDir="`dirname ${PBI_PROGDIRPATH}/${_dsd}/${_dbfile}`"
-	                        sed -i.bak "s|${rmBaseDir}/|${PBI_PROGDIRPATH}/${PBI_FAKEBIN_DIR}/|g" "${PBI_PROGDIRPATH}/${_dsd}/${_dbfile}"
+				rmBaseDir="`dirname ${_dbbin}`"
+	                        sed -i.bak "s|${PBI_PROGDIRPATH}/${rmBaseDir}/|${PBI_PROGDIRPATH}/${PBI_FAKEBIN_DIR}/|g" "${PBI_PROGDIRPATH}/${_dsd}/${_dbfile}"
 	                        rm "${PBI_PROGDIRPATH}/${_dsd}/${_dbfile}.bak"
-				
 			else
 				dbext=".xml"
 			fi



More information about the Commits mailing list