[PC-BSD Commits] r7830 - in pcbsd/current/src-sh/pbi-manager: . man

svn at pcbsd.org svn at pcbsd.org
Thu Oct 14 14:18:16 PDT 2010


Author: kris
Date: 2010-10-14 14:18:16 -0700 (Thu, 14 Oct 2010)
New Revision: 7830

Modified:
   pcbsd/current/src-sh/pbi-manager/man/pbi_makeport.1
   pcbsd/current/src-sh/pbi-manager/pbi-manager
Log:

Update to pbi-manager, added support for --mkdebug, which when used will drop to a shell
if pbi_makeport compiling files, allowing debugging of why this occured. 

Also, disable using LD_LIBRARY_PATH for port compiles, set some CFLAGS / CPPFLAGS / LDFLAGS instead, seems
much better solution, which doesn't break some ports



Modified: pcbsd/current/src-sh/pbi-manager/man/pbi_makeport.1
===================================================================
--- pcbsd/current/src-sh/pbi-manager/man/pbi_makeport.1	2010-10-14 20:37:08 UTC (rev 7829)
+++ pcbsd/current/src-sh/pbi-manager/man/pbi_makeport.1	2010-10-14 21:18:16 UTC (rev 7830)
@@ -12,6 +12,7 @@
 .Op Fl d Ar portsdir
 .Op Fl o Ar outdir
 .Op Fl p Ar prefix
+.Op Fl -mkdebug
 .Op Fl -no-prune
 .Op Fl -sign Ar keyfile
 .Op Ar port
@@ -44,6 +45,11 @@
 .It Fl p Ar prefix
 Manually provide a PREFIX, which determines the location where the
 PBI will end up being installed on the end-users system. 
+.It Fl -mkdebug
+When doing a port build you may run into compile / make failures. Enabling
+this option will drop you to a shell prompt after a failure, keeping
+the various build options set, allowing debugging and testing of 
+why the port may have failed. 
 .It Fl -no-prune
 Disable auto-pruning of non REQUIREDBY ports after the compile phase.
 By default any ports which are used solely building and not required

Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager	2010-10-14 20:37:08 UTC (rev 7829)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager	2010-10-14 21:18:16 UTC (rev 7830)
@@ -112,6 +112,7 @@
   -k           -- Keep build files, don't delete when finished
   -o outdir    -- Where to place the finished PBI file
   -p prefix    -- Specify alternate PBI Compile PREFIX
+  --mkdebug    -- Drop to debug shell if port make fails
   --no-prune   -- Do not prune non REQUIREDBY ports
   --sign key   -- Sign the PBI with specified openssl key
 
@@ -595,6 +596,8 @@
 
                 --no-prune)	PBI_PRUNEBUILDPORTS="NO"
                         ;;
+                --mkdebug)	MKDEBUG="YES"
+                        ;;
                 -o)	if [ $# -eq 1 ]; then usage_make_pbi; fi
                         shift; PBI_CREATE_OUTDIR="$1"
                         ;;
@@ -745,6 +748,7 @@
 	PBI_UNINS_PATHSCRIPT="uninstall-pathlinks.sh"
 
         # User overridable variables
+	MKDEBUG=""
 	PBI_AB_ARCHIVENUM=""
 	PBI_AB_CONFDIR=""
 	PBI_AB_GENPATCH="NO"
@@ -976,9 +980,13 @@
 	LDCONFIG_DIRS="${PREFIX}/lib"
 	export LDCONFIG_DIRS
 
-	LD_LIBRARY_PATH="${PREFIX}/lib:${PREFIX}/kde4/lib"
-	export LD_LIBRARY_PATH
+	#LD_LIBRARY_PATH="${PREFIX}/lib:${PREFIX}/kde4/lib"
+	#export LD_LIBRARY_PATH
 
+	echo "LDFLAGS+=-L${PREFIX}/lib" >> ${__MAKE_CONF}
+	echo "CFLAGS+=-Wl,-L${PREFIX}/lib/" >> ${__MAKE_CONF}
+	echo "CPPFLAGS+=-Wl,-L${PREFIX}/lib" >> ${__MAKE_CONF}
+
 	# Set the DBDIRS
 	PKG_DBDIR="${PREFIX}/.pkgdb" ; export PKG_DBDIR
 	PORT_DBDIR="${PREFIX}/.portdb" ; export PORT_DBDIR
@@ -2808,6 +2816,10 @@
 	make
 	make install
 	if [ "$?" != "0" ] ; then
+		if [ "$MKDEBUG" = "YES" ] ; then
+			echo "Failed! Running /bin/sh for debugging, type 'exit' to finish."
+			/bin/sh
+		fi
 		exit_err "make install of ${PBI_MAKEPORT} failed!"
 	fi
 }
@@ -2887,6 +2899,10 @@
 		make
 		make install
 		if [ "$?" != "0" ] ; then
+			if [ "$MKDEBUG" = "YES" ] ; then
+				echo "Failed! Running /bin/sh for debugging, type 'exit' to finish."
+				/bin/sh
+			fi
 			exit_err "make install of ${port} failed!"
 		fi
 	done < ${PBI_PROGDIRPATH}/.otherports
@@ -2909,6 +2925,10 @@
 		make
 		make install
 		if [ "$?" != "0" ] ; then
+			if [ "$MKDEBUG" = "YES" ] ; then
+				echo "Failed! Running /bin/sh for debugging, type 'exit' to finish."
+				/bin/sh
+			fi
 			exit_err "make install of ${port} failed!"
 		fi
 	done < ${PBI_PROGDIRPATH}/.otherports



More information about the Commits mailing list