Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Feb 2017 22:22:28 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r434316 - head/Mk/Scripts
Message-ID:  <201702172222.v1HMMSIP045406@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Fri Feb 17 22:22:27 2017
New Revision: 434316
URL: https://svnweb.freebsd.org/changeset/ports/434316

Log:
  ports_env: Fix OPSYS not being exported.
  
  This was causing excessive 'uname -s' executions during Poudriere dependency
  calculations.  The reasoning is due to HAVE_COMPAT_IA32_KERN having a newline
  quoted at the end of it as '\ ' by bmake:
  
    # make -f Mk/bsd.port.mk -V 'HAVE_COMPAT_IA32_KERN=${HAVE_COMPAT_IA32_KERN:Q}' | cat -v
    HAVE_COMPAT_IA32_KERN=YES\
  
  This resulted in the following being executed:
  
    export HAVE_COMPAT_IA32_KERN="YES OPSYS=FreeBSD"
  
  With hat:	portmgr

Modified:
  head/Mk/Scripts/functions.sh

Modified: head/Mk/Scripts/functions.sh
==============================================================================
--- head/Mk/Scripts/functions.sh	Fri Feb 17 21:04:38 2017	(r434315)
+++ head/Mk/Scripts/functions.sh	Fri Feb 17 22:22:27 2017	(r434316)
@@ -202,7 +202,7 @@ export_ports_env() {
 
 	# Bring in all the vars, but not empty ones.
 	eval $(${MAKE} -f ${PORTSDIR}/Mk/bsd.port.mk ${make_cmd} \
-	    USES="${uses}" | grep -v '=$')
+	    USES="${uses}" | grep -v '=$' | sed -e 's,\\ $,,')
 	for var in ${export_vars}; do
 		# Export and display non-empty ones.  This is not redundant
 		# with above since we're looping on all vars here; do not



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702172222.v1HMMSIP045406>