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

svn at pcbsd.org svn at pcbsd.org
Mon Dec 10 10:14:09 PST 2012


Author: kris
Date: 2012-12-10 18:14:09 +0000 (Mon, 10 Dec 2012)
New Revision: 20458

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

Auto-identify binaries, if Linux be sure to set the Linux flag
so we pull from the right libary directory first



Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager	2012-12-10 18:13:18 UTC (rev 20457)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager	2012-12-10 18:14:09 UTC (rev 20458)
@@ -7173,52 +7173,19 @@
 		# See if this is executable and set it as binary
 		dirname ${f} | grep -e "bin" -e "sbin" >/dev/null 2>/dev/null
 		if [ -x "${PBI_PROGDIRPATH}/${f}" -a $? -eq 0 ] ; then
-			echo "${f}	${f}	binary,nocrash" >> "$_ef"
+
+		   # Check this executable, if Linux binary, flag it
+		   file "${PBI_PROGDIRPATH}/${f}" | grep -iq "Linux"
+		   if [ $? -ne 0 ] ; then
+	  	      echo "${f}	${f}	binary,nocrash" >> "$_ef"
+		   else
+	  	      echo "${f}	${f}	linux,nocrash" >> "$_ef"
+ 		   fi
 		else
 			echo "${f}	${f}	replace" >> "$_ef"
 		fi
 	done < ${PBI_TMPDIR}/.pkg_flist.$$
 	rm "${PBI_TMPDIR}/.pkg_flist.$$"
-
-	# Skip the dbus stuff for now causes weird issues with various apps
-	return 0
-
-	# Now figure out any dbus services we need to make links / wrappers for
- 	for _dsd in $DBUS_SEARCH_DIRS
-	do
-		# Check if we have a valid dbus directory
-		[ -d "${PBI_PROGDIRPATH}/${_dsd}" ] || continue
-
-		# Make a list of files to include
-		find ${PBI_PROGDIRPATH}/${_dsd} -type f | sed "s|${PBI_PROGDIRPATH}/${_dsd}/||g" > ${PBI_TMPDIR}/.dbus.$$
-		
-		# Add these files to the external links file
-		while read _dbfile
-		do
-			# Get the file extension, only .xml and .service are valid
-			case "${_dsd}/${_dbfile}" in
-				*.xml) dbext=".xml" ;;
-				*.service)
-					dbext=".service"
-
-					# We have a service file, find the target binary and make sure its added as a wrapper only
-					_dbbin="`grep 'Exec' ${PBI_PROGDIRPATH}/${_dsd}/${_dbfile} | cut -d '=' -f 2 | cut -d ' ' -f 1`"
-					_dbbin=`echo "$_dbbin" | sed "s|${PBI_PROGDIRPATH}/||g"`
-					[ -n "$_dbbin" ] && echo "${_dbbin}		${_dbbin}	binwrapper" >> "$_ef"
-
-					# Massage the service file to point to the fakebin wrapper
-					rmBaseDir="`dirname ${_dbbin}`"
-					sed -i '' "s|${PBI_PROGDIRPATH}/${rmBaseDir}/|${PBI_PROGDIRPATH}/${PBI_FAKEBIN_DIR}/|g" "${PBI_PROGDIRPATH}/${_dsd}/${_dbfile}"
-					;;
-				*) continue ;;
-			esac
-
-			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