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

svn at pcbsd.org svn at pcbsd.org
Fri Jul 30 06:21:59 PDT 2010


Author: kris
Date: 2010-07-30 06:21:59 -0700 (Fri, 30 Jul 2010)
New Revision: 7321

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

Attempt to fix dbus auto-external link generation, should work properly now



Modified: pcbsd-projects/pbi-manager/pbi-manager
===================================================================
--- pcbsd-projects/pbi-manager/pbi-manager	2010-07-29 14:05:05 UTC (rev 7320)
+++ pcbsd-projects/pbi-manager/pbi-manager	2010-07-30 13:21:59 UTC (rev 7321)
@@ -1351,6 +1351,7 @@
 
 # Parse any external link directives
 mk_extlink_entries() {
+	init_tmpdir
 	_extf="${PBI_CONFDIR}/${MOD_EXTLINKFILE}"
 	_autoextf="${PBI_STAGEDIR}/${MOD_AUTOEXTLINKFILE}"
 	_tmpextf="${PBI_TMPDIR}/${MOD_AUTOEXTLINKFILE}.$$"
@@ -1443,6 +1444,7 @@
 
 	chmod 755 "${dir}/${PBI_INS_PATHSCRIPT}"
 	chmod 755 "${dir}/${PBI_UNINS_PATHSCRIPT}"
+	rm_tmpdir
 }
 
 
@@ -2714,27 +2716,29 @@
 		while read _dbfile
 		do
 			# Get the file extension, only .xml and .service are valid
-			echo "$_dbfile" | grep -e ".xml" -e ".service" >/dev/null 2>/dev/null
+			echo "${_dsd}/${_dbfile}" | grep -e ".xml" -e ".service" >/dev/null 2>/dev/null
 			if [ "$?" != "0" ]; then continue ; fi
 
 			# Check if this is a .service or .xml file
-		 	if echo "$_dbfile" | grep ".service" >/dev/null 2>/dev/null ; then
+		 	if echo "${_dsd}/$_dbfile" | grep ".service" >/dev/null 2>/dev/null ; then
 				dbext=".service"
 
 				# We have a service file, find the target binary and make sure its added as a wrapper only
-				_dbbin="`cat ${_dbfile} | grep 'Exec' | cut -d '=' -f 2`"
+				_dbbin="`cat ${_dsd}/${_dbfile} | grep 'Exec' | cut -d '=' -f 2`"
+				_dbbin=`echo $_dbbin | sed "s|${PBI_PROGDIRPATH}/||g"`
+				if [ ! -z "$_dbbin" ] ; then
 				echo "${_dbbin}		${_dbbin}	binwrapper" >> "$_ef"
+				fi
 			else
 				dbext=".xml"
 			fi
 
-			echo "${_dbfile}	${_dbfile}.${_pname}.${dbext}	replace" >> "$_ef"
+			echo "${_dsd}/${_dbfile}	${_dsd}/${_dbfile}.${_pname}.${dbext}	replace" >> "$_ef"
 		done < ${PBI_TMPDIR}/.dbus.$$
 		rm ${PBI_TMPDIR}/.dbus.$$
 
 	done	
 
-	
 }
 
 # Init the crash handler routine



More information about the Commits mailing list