From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-commits+bounces-381663-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1R2tFf-0002xk-JA
	for garchives@archives.gentoo.org; Sun, 11 Sep 2011 23:15:51 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 3D4DD21C118;
	Sun, 11 Sep 2011 23:15:44 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	by pigeon.gentoo.org (Postfix) with ESMTP id E746021C118
	for <gentoo-commits@lists.gentoo.org>; Sun, 11 Sep 2011 23:15:43 +0000 (UTC)
Received: from pelican.gentoo.org (unknown [66.219.59.40])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 5DDCB1B400A
	for <gentoo-commits@lists.gentoo.org>; Sun, 11 Sep 2011 23:15:43 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by pelican.gentoo.org (Postfix) with ESMTP id 8FEAA80042
	for <gentoo-commits@lists.gentoo.org>; Sun, 11 Sep 2011 23:15:42 +0000 (UTC)
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" <zmedico@gentoo.org>
Message-ID: <11d543aacf2ee7f7f214a256aabf668ad27ca013.zmedico@gentoo>
Subject: [gentoo-commits] proj/portage:master commit in: bin/
X-VCS-Repository: proj/portage
X-VCS-Files: bin/ebuild.sh bin/isolated-functions.sh bin/phase-helpers.sh
X-VCS-Directories: bin/
X-VCS-Committer: zmedico
X-VCS-Committer-Name: Zac Medico
X-VCS-Revision: 11d543aacf2ee7f7f214a256aabf668ad27ca013
Date: Sun, 11 Sep 2011 23:15:42 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 
X-Archives-Hash: f95cb7a5d4bd5161dbb64892560380ac

commit:     11d543aacf2ee7f7f214a256aabf668ad27ca013
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 11 23:15:28 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Sep 11 23:15:28 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a=
=3Dcommit;h=3D11d543aa

ebuild.sh: move hasg* funcs into econf

---
 bin/ebuild.sh             |    8 --------
 bin/isolated-functions.sh |    4 ++--
 bin/phase-helpers.sh      |   15 ++++++++++++---
 3 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 355a1c0..832b39d 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -166,14 +166,6 @@ strip_duplicate_slashes() {
 	fi
 }
=20
-hasg() {
-    local x s=3D$1
-    shift
-    for x ; do [[ ${x} =3D=3D ${s} ]] && echo "${x}" && return 0 ; done
-    return 1
-}
-hasgq() { hasg "$@" >/dev/null ; }
-
 # debug-print() gets called from many places with verbose status informa=
tion useful
 # for tracking down problems. The output is in $T/eclass-debug.log.
 # You can set ECLASS_DEBUG_OUTPUT to redirect the output somewhere else =
as well.

diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index 8e367ff..c5adc0c 100644
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -586,7 +586,7 @@ save_ebuild_env() {
 			esyslog einfo einfon ewarn eerror ebegin _eend eend KV_major \
 			KV_minor KV_micro KV_to_int get_KV unset_colors set_colors has \
 			has_phase_defined_up_to \
-			hasg hasgq hasv hasq qa_source qa_call \
+			hasv hasq qa_source qa_call \
 			addread addwrite adddeny addpredict _sb_append_var \
 			use usev useq has_version portageq \
 			best_version use_with use_enable register_die_hook \
@@ -602,7 +602,7 @@ save_ebuild_env() {
 			set_unless_changed unset_unless_changed source_all_bashrcs \
 			ebuild_main ebuild_phase ebuild_phase_with_hooks \
 			_ebuild_arg_to_phase _ebuild_phase_funcs default \
-			_pipestatus \
+			_hasg _hasgq _unpack_tar \
 			${QA_INTERCEPTORS}
=20
 		# portage config variables and variables set directly by portage

diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index 1f39c75..a033fa8 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -369,6 +369,15 @@ unpack() {
 econf() {
 	local x
=20
+	_hasg() {
+		local x s=3D$1
+		shift
+		for x ; do [[ ${x} =3D=3D ${s} ]] && echo "${x}" && return 0 ; done
+		return 1
+	}
+
+	_hasgq() { _hasg "$@" >/dev/null ; }
+
 	local phase_func=3D$(_ebuild_arg_to_phase "$EAPI" "$EBUILD_PHASE")
 	if [[ -n $phase_func ]] ; then
 		if has "$EAPI" 0 1 ; then
@@ -411,9 +420,9 @@ econf() {
 		if [[ -n ${ABI} && -n ${!LIBDIR_VAR} ]] ; then
 			CONF_LIBDIR=3D${!LIBDIR_VAR}
 		fi
-		if [[ -n ${CONF_LIBDIR} ]] && ! hasgq --libdir=3D\* "$@" ; then
-			export CONF_PREFIX=3D$(hasg --exec-prefix=3D\* "$@")
-			[[ -z ${CONF_PREFIX} ]] && CONF_PREFIX=3D$(hasg --prefix=3D\* "$@")
+		if [[ -n ${CONF_LIBDIR} ]] && ! _hasgq --libdir=3D\* "$@" ; then
+			export CONF_PREFIX=3D$(_hasg --exec-prefix=3D\* "$@")
+			[[ -z ${CONF_PREFIX} ]] && CONF_PREFIX=3D$(_hasg --prefix=3D\* "$@")
 			: ${CONF_PREFIX:=3D/usr}
 			CONF_PREFIX=3D${CONF_PREFIX#*=3D}
 			[[ ${CONF_PREFIX} !=3D /* ]] && CONF_PREFIX=3D"/${CONF_PREFIX}"