From owner-svn-ports-all@freebsd.org Tue Oct 13 00:03:12 2015 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AABC9D126E; Tue, 13 Oct 2015 00:03:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7254EE01; Tue, 13 Oct 2015 00:03:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9D03ARA091871; Tue, 13 Oct 2015 00:03:10 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9D03ARi091869; Tue, 13 Oct 2015 00:03:10 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510130003.t9D03ARi091869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 13 Oct 2015 00:03:10 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r399171 - head/Mk/Scripts X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2015 00:03:12 -0000 Author: bdrewery Date: Tue Oct 13 00:03:10 2015 New Revision: 399171 URL: https://svnweb.freebsd.org/changeset/ports/399171 Log: Follow-up r399170 with a script, ports_env.sh, that can be used for the purpose. This will allow Poudriere to know if it is possible to use the feature or not by the existence of the file. Also fix quoting issues. With hat: portmgr Added: head/Mk/Scripts/ports_env.sh (contents, props changed) Modified: head/Mk/Scripts/functions.sh Modified: head/Mk/Scripts/functions.sh ============================================================================== --- head/Mk/Scripts/functions.sh Mon Oct 12 23:41:36 2015 (r399170) +++ head/Mk/Scripts/functions.sh Tue Oct 13 00:03:10 2015 (r399171) @@ -159,7 +159,7 @@ validate_env() { fi } -export_index_env() { +export_ports_env() { local export_vars make_cmd make_env var results value validate_env MAKE PORTSDIR @@ -192,7 +192,7 @@ export_index_env() { " for var in ${export_vars}; do - make_cmd="${make_cmd}${make_cmd:+ }-V ${var}=\${${var}}" + make_cmd="${make_cmd}${make_cmd:+ }-V ${var}=\${${var}:Q}" done # Bring in all the vars, but not empty ones. @@ -205,7 +205,7 @@ export_index_env() { if [ -n "${value}" ]; then export ${var} - echo "export ${var}=${value}" + echo "export ${var}=\"${value}\"" fi done } Added: head/Mk/Scripts/ports_env.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/Mk/Scripts/ports_env.sh Tue Oct 13 00:03:10 2015 (r399171) @@ -0,0 +1,13 @@ +#! /bin/sh + +# MAINTAINER: portmgr@FreeBSD.org +# $FreeBSD$ + +if [ -z "${SCRIPTSDIR}" ]; then + echo "Must set SCRIPTSDIR" >&2 + exit 1 +fi + +. ${SCRIPTSDIR}/functions.sh + +export_ports_env