From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8409A138CCF for ; Thu, 14 May 2015 09:43:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 34C66E07A3; Thu, 14 May 2015 09:43:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D6F84E07A3 for ; Thu, 14 May 2015 09:43:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F2131340C25 for ; Thu, 14 May 2015 09:43:31 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A74D49BD for ; Thu, 14 May 2015 09:43:30 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1431596470.122465d2c507cd4904d940500dcf23eaab93954f.vapier@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ebuild-helpers/ X-VCS-Repository: proj/portage X-VCS-Files: bin/ebuild-helpers/doconfd bin/ebuild-helpers/dodoc bin/ebuild-helpers/doenvd bin/ebuild-helpers/doheader bin/ebuild-helpers/doinitd bin/ebuild-helpers/dolib.a bin/ebuild-helpers/dolib.so X-VCS-Directories: bin/ebuild-helpers/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 122465d2c507cd4904d940500dcf23eaab93954f X-VCS-Branch: master Date: Thu, 14 May 2015 09:43:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: bcab88a2-0911-4606-beba-289bf69ec701 X-Archives-Hash: 7fca9da7dd786380f34d7f4a28d05764 commit: 122465d2c507cd4904d940500dcf23eaab93954f Author: Mike Frysinger gentoo org> AuthorDate: Thu May 14 09:41:10 2015 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Thu May 14 09:41:10 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=122465d2 ebuild-helpers: avoid `env` indirection by setting the vars before the exec Setting an env var on the same line as the exec will make bash export the var to the program it execs. That means these forms are practically equiv: FOO=val exec blah exec env FOO=val blah The difference is that we now avoid execing env entirely. bin/ebuild-helpers/doconfd | 5 +---- bin/ebuild-helpers/dodoc | 5 +---- bin/ebuild-helpers/doenvd | 5 +---- bin/ebuild-helpers/doheader | 5 +---- bin/ebuild-helpers/doinitd | 5 +---- bin/ebuild-helpers/dolib.a | 3 +-- bin/ebuild-helpers/dolib.so | 3 +-- 7 files changed, 7 insertions(+), 24 deletions(-) diff --git a/bin/ebuild-helpers/doconfd b/bin/ebuild-helpers/doconfd index a3c09a5..1baa3ed 100755 --- a/bin/ebuild-helpers/doconfd +++ b/bin/ebuild-helpers/doconfd @@ -8,7 +8,4 @@ if [[ $# -lt 1 ]] ; then exit 1 fi -exec \ -env \ -INSDESTTREE="/etc/conf.d/" \ -doins "$@" +INSDESTTREE='/etc/conf.d/' exec doins "$@" diff --git a/bin/ebuild-helpers/dodoc b/bin/ebuild-helpers/dodoc index 99122c4..6ccf0a4 100755 --- a/bin/ebuild-helpers/dodoc +++ b/bin/ebuild-helpers/dodoc @@ -5,10 +5,7 @@ source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh if ___eapi_dodoc_supports_-r; then - exec \ - env \ - __PORTAGE_HELPER="dodoc" \ - doins "$@" + __PORTAGE_HELPER='dodoc' exec doins "$@" fi if [ $# -lt 1 ] ; then diff --git a/bin/ebuild-helpers/doenvd b/bin/ebuild-helpers/doenvd index 9287933..67bb934 100755 --- a/bin/ebuild-helpers/doenvd +++ b/bin/ebuild-helpers/doenvd @@ -8,7 +8,4 @@ if [[ $# -lt 1 ]] ; then exit 1 fi -exec \ -env \ -INSDESTTREE="/etc/env.d/" \ -doins "$@" +INSDESTTREE='/etc/env.d/' exec doins "$@" diff --git a/bin/ebuild-helpers/doheader b/bin/ebuild-helpers/doheader index 3795365..e4cae6a 100755 --- a/bin/ebuild-helpers/doheader +++ b/bin/ebuild-helpers/doheader @@ -13,7 +13,4 @@ if [[ $# -lt 1 ]] || [[ $1 == -r && $# -lt 2 ]] ; then exit 1 fi -exec \ -env \ -INSDESTTREE="/usr/include/" \ -doins "$@" +INSDESTTREE='/usr/include/' exec doins "$@" diff --git a/bin/ebuild-helpers/doinitd b/bin/ebuild-helpers/doinitd index 476b858..aa7b66c 100755 --- a/bin/ebuild-helpers/doinitd +++ b/bin/ebuild-helpers/doinitd @@ -8,7 +8,4 @@ if [[ $# -lt 1 ]] ; then exit 1 fi -exec \ -env \ -_E_EXEDESTTREE_="/etc/init.d/" \ -doexe "$@" +_E_EXEDESTTREE_='/etc/init.d/' exec doexe "$@" diff --git a/bin/ebuild-helpers/dolib.a b/bin/ebuild-helpers/dolib.a index d2279dc..61961e4 100755 --- a/bin/ebuild-helpers/dolib.a +++ b/bin/ebuild-helpers/dolib.a @@ -2,5 +2,4 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -exec env LIBOPTIONS="-m0644" \ - dolib "$@" +LIBOPTIONS='-m0644' exec dolib "$@" diff --git a/bin/ebuild-helpers/dolib.so b/bin/ebuild-helpers/dolib.so index 4bdbfab..eab8c91 100755 --- a/bin/ebuild-helpers/dolib.so +++ b/bin/ebuild-helpers/dolib.so @@ -2,5 +2,4 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -exec env LIBOPTIONS="-m0755" \ - dolib "$@" +LIBOPTIONS='-m0755' exec dolib "$@"