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

svn at pcbsd.org svn at pcbsd.org
Mon Oct 8 13:47:26 PDT 2012


Author: kris
Date: 2012-10-08 20:47:26 +0000 (Mon, 08 Oct 2012)
New Revision: 19616

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

Fix an issue running "make -C" to set PORTSDIR=${PORTSDIR}. This allows us to
use a non-standard PORTSDIR without needing /usr/ports to be populated



Modified: pcbsd/current/src-sh/pbi-manager/pbi-manager
===================================================================
--- pcbsd/current/src-sh/pbi-manager/pbi-manager	2012-10-08 20:21:22 UTC (rev 19615)
+++ pcbsd/current/src-sh/pbi-manager/pbi-manager	2012-10-08 20:47:26 UTC (rev 19616)
@@ -1527,11 +1527,11 @@
 	fi
 
 	if [ -z "${PBI_PROGVERSION}" -a -n "${PORTSDIR}" -a -n "${PBI_MAKEPORT}" ] ; then
-		PORTVER="`make -C ${PORTSDIR}/${PBI_MAKEPORT} -V DISTVERSION 2>/dev/null`"
+		PORTVER="`make -C ${PORTSDIR}/${PBI_MAKEPORT} -V DISTVERSION PORTSDIR=${PORTSDIR} 2>/dev/null`"
 
   		# Check if we have a portrevision to use in version number
   		PORTREV=""
-  		PORTREV="`make -C ${PORTSDIR}/${PBI_MAKEPORT} -V PORTREVISION 2>/dev/null`"
+  		PORTREV="`make -C ${PORTSDIR}/${PBI_MAKEPORT} -V PORTREVISION PORTSDIR=${PORTSDIR} 2>/dev/null`"
   		if [ -n "${PORTREV}" -a "${PORTREV}" != "0" ]
  		then
 			PBI_PROGVERSION="${PORTVER}_${PORTREV}"
@@ -1541,7 +1541,7 @@
 
 		if [ -z "${PBI_PROGVERSION}" ] ; then
 			echo "Warning: Unable to set PBI_PROGVERSION with:"
-		        echo "make -C ${PORTSDIR}/${PBI_MAKEPORT} -V DISTVERSION"
+		        echo "make -C ${PORTSDIR}/${PBI_MAKEPORT} -V DISTVERSION PORTSDIR=${PORTSDIR}"
 		fi
 	else
 		echo "PBI_PROGVERSION - $PBI_PROGVERSION - PORTSDIR - ${PORTSDIR} - $PBI_MAKEPORT - $PBI_MAKE_PORT - pbi - $pbi"
@@ -1565,9 +1565,9 @@
 
 	if [ -z "${PBI_PROGNAME}" -a -n "${PORTSDIR}" -a -n "${PBI_MAKEPORT}" ] ; then
 		# Get the proper package name from the prefix + name + suffix
-		local pkgPrefix="`make -C ${PORTSDIR}/${PBI_MAKEPORT} -V PKGNAMEPREFIX`"
-		local pkgName="`make -C ${PORTSDIR}/${PBI_MAKEPORT} -V PORTNAME`"
-		local pkgSuffix="`make -C ${PORTSDIR}/${PBI_MAKEPORT} -V PKGNAMESUFFIX`"
+		local pkgPrefix="`make -C ${PORTSDIR}/${PBI_MAKEPORT} -V PKGNAMEPREFIX PORTSDIR=${PORTSDIR}`"
+		local pkgName="`make -C ${PORTSDIR}/${PBI_MAKEPORT} -V PORTNAME PORTSDIR=${PORTSDIR}`"
+		local pkgSuffix="`make -C ${PORTSDIR}/${PBI_MAKEPORT} -V PKGNAMESUFFIX PORTSDIR=${PORTSDIR}`"
 		PBI_PROGNAME="${pkgPrefix}${pkgName}${pkgSuffix}"
 	else
 		exit_err "Failed to locate PBI_PROGNAME"
@@ -4853,7 +4853,7 @@
 
 # Get the full package-name for a target port
 get_pkgname() {
-        name="`make -C ${1} -V PKGNAME`"
+        name="`make -C ${1} -V PKGNAME PORTSDIR=${PORTSDIR}`"
 	PKGNAME="${name}"
 }
 
@@ -5487,7 +5487,7 @@
 check_port_compat_arch()
 {
 	local sPort=$1
- 	local cValues="`make -C $sPort -V ONLY_FOR_ARCHS`"
+ 	local cValues="`make -C $sPort -V ONLY_FOR_ARCHS PORTSDIR=${PORTSDIR}`"
 	if [ -z "$cValues" ] ; then return 0 ; fi
 
 	for cArch in $cValues
@@ -6885,12 +6885,12 @@
   echo "Checking port: $_lPort"
 
   # Make sure this port isn't already loaded
-  local pkgName=`make -V PKGNAME -C $_lPort`
+  local pkgName=`make -V PKGNAME -C $_lPort PORTSDIR=${PORTSDIR}`
   if [ -e "/var/db/pkg/${pkgName}" ] ; then return ; fi
 
   # Save any users / groups we need to create later
-  local pUsers="`make -V USERS -C $_lPort`"
-  local pGroups="`make -V GROUPS -C $_lPort`"
+  local pUsers="`make -V USERS -C $_lPort PORTSDIR=${PORTSDIR}`"
+  local pGroups="`make -V GROUPS -C $_lPort PORTSDIR=${PORTSDIR}`"
   if [ -n "$pUsers" ] ; then
      PBI_BUILD_USERS="$PBI_BUILD_USERS $pUsers"
   fi
@@ -6904,7 +6904,7 @@
   while read line
   do
     local _port="$line"
-    local _depPkgName=`make -V PKGNAME -C $_port`
+    local _depPkgName=`make -V PKGNAME -C $_port PORTSDIR=${PORTSDIR}`
     # is this installed?
     if [ -e "/var/db/pkg/${_depPkgName}" ] ; then continue ; fi
 



More information about the Commits mailing list