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 ) id 1R2tyX-000224-7K for garchives@archives.gentoo.org; Mon, 12 Sep 2011 00:02:13 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7AAB721C0D3; Mon, 12 Sep 2011 00:02:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 0261921C1B5 for ; Mon, 12 Sep 2011 00:02:04 +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 3F5731B400C for ; Mon, 12 Sep 2011 00:02:04 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 470CD80042 for ; Mon, 12 Sep 2011 00:02:03 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <8d2db38d565f852537211c80153f56a251b84f3a.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/ebuild.sh bin/phase-functions.sh X-VCS-Directories: bin/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 8d2db38d565f852537211c80153f56a251b84f3a Date: Mon, 12 Sep 2011 00:02:03 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 1d30ef884d640823bfc3cec8df0298d2 commit: 8d2db38d565f852537211c80153f56a251b84f3a Author: Zac Medico gentoo org> AuthorDate: Mon Sep 12 00:01:50 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Mon Sep 12 00:01:50 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D8d2db38d Move preprocess_ebuild_env to phase-functions.sh. --- bin/ebuild.sh | 188 ------------------------------------------= ------ bin/phase-functions.sh | 184 ++++++++++++++++++++++++++++++++++++++++++= ++++ 2 files changed, 184 insertions(+), 188 deletions(-) diff --git a/bin/ebuild.sh b/bin/ebuild.sh index a781c2e..d722ccc 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -371,201 +371,13 @@ source_all_bashrcs() { [ ! -z "${OCXX}" ] && export CXX=3D"${OCXX}" } =20 -# Hardcoded bash lists are needed for backward compatibility with -# > "$T/environment.filtered" || return $? - unset _portage_filter_opts - mv "${T}"/environment.filtered "${T}"/environment || return $? - rm -f "${T}/environment.success" || return $? - # WARNING: Code inside this subshell should avoid making assumptions - # about variables or functions after source "${T}"/environment has been - # called. Any variables that need to be relied upon should already be - # filtered out above. - ( - export SANDBOX_ON=3D1 - source "${T}/environment" || exit $? - # We have to temporarily disable sandbox since the - # SANDBOX_{DENY,READ,PREDICT,WRITE} values we've just loaded - # may be unusable (triggering in spurious sandbox violations) - # until we've merged them with our current values. - export SANDBOX_ON=3D0 - - # It's remotely possible that save_ebuild_env() has been overridden - # by the above source command. To protect ourselves, we override it - # here with our own version. ${PORTAGE_BIN_PATH} is safe to use here - # because it's already filtered above. - source "${PORTAGE_BIN_PATH}/isolated-functions.sh" || exit $? - - # Rely on save_ebuild_env() to filter out any remaining variables - # and functions that could interfere with the current environment. - save_ebuild_env || exit $? - >> "$T/environment.success" || exit $? - ) > "${T}/environment.filtered" - local retval - if [ -e "${T}/environment.success" ] ; then - filter_readonly_variables --filter-features < \ - "${T}/environment.filtered" > "${T}/environment" - retval=3D$? - else - retval=3D1 - fi - rm -f "${T}"/environment.{filtered,raw,success} - return ${retval} -} - # =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D = =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D= =3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D # =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D functions end, main = part begins =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D -# =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D functions end, main = part begins =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D -# =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D functions end, main = part begins =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D # =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D = =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =3D= =3D=3D =3D=3D=3D =3D=3D=3D =3D=3D=3D =20 export SANDBOX_ON=3D"1" export S=3D${WORKDIR}/${P} =20 -unset E_IUSE E_REQUIRED_USE E_DEPEND E_RDEPEND E_PDEPEND - # Turn of extended glob matching so that g++ doesn't get incorrectly mat= ched. shopt -u extglob =20 diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh index 383253d..f1db257 100644 --- a/bin/phase-functions.sh +++ b/bin/phase-functions.sh @@ -2,6 +2,190 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 =20 +# Hardcoded bash lists are needed for backward compatibility with +# > "$T/environment.filtered" || return $? + unset _portage_filter_opts + mv "${T}"/environment.filtered "${T}"/environment || return $? + rm -f "${T}/environment.success" || return $? + # WARNING: Code inside this subshell should avoid making assumptions + # about variables or functions after source "${T}"/environment has been + # called. Any variables that need to be relied upon should already be + # filtered out above. + ( + export SANDBOX_ON=3D1 + source "${T}/environment" || exit $? + # We have to temporarily disable sandbox since the + # SANDBOX_{DENY,READ,PREDICT,WRITE} values we've just loaded + # may be unusable (triggering in spurious sandbox violations) + # until we've merged them with our current values. + export SANDBOX_ON=3D0 + + # It's remotely possible that save_ebuild_env() has been overridden + # by the above source command. To protect ourselves, we override it + # here with our own version. ${PORTAGE_BIN_PATH} is safe to use here + # because it's already filtered above. + source "${PORTAGE_BIN_PATH}/isolated-functions.sh" || exit $? + + # Rely on save_ebuild_env() to filter out any remaining variables + # and functions that could interfere with the current environment. + save_ebuild_env || exit $? + >> "$T/environment.success" || exit $? + ) > "${T}/environment.filtered" + local retval + if [ -e "${T}/environment.success" ] ; then + filter_readonly_variables --filter-features < \ + "${T}/environment.filtered" > "${T}/environment" + retval=3D$? + else + retval=3D1 + fi + rm -f "${T}"/environment.{filtered,raw,success} + return ${retval} +} + ebuild_phase() { declare -F "$1" >/dev/null && qa_call $1 }