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 1Mzj2u-00063c-W9 for garchives@archives.gentoo.org; Mon, 19 Oct 2009 03:36:33 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0DB86E0675; Mon, 19 Oct 2009 03:36:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id B9F3FE0675 for ; Mon, 19 Oct 2009 03:36:31 +0000 (UTC) Received: from stork.gentoo.org (stork.gentoo.org [64.127.104.133]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 2C496675C1 for ; Mon, 19 Oct 2009 03:36:31 +0000 (UTC) Received: from zmedico by stork.gentoo.org with local (Exim 4.69) (envelope-from ) id 1Mzj2s-0000Hh-Oa for gentoo-commits@lists.gentoo.org; Mon, 19 Oct 2009 03:36:30 +0000 To: gentoo-commits@lists.gentoo.org From: "Zac Medico (zmedico)" Subject: [gentoo-commits] portage r14682 - main/branches/2.1.7/bin X-VCS-Repository: portage X-VCS-Revision: 14682 X-VCS-Files: main/branches/2.1.7/bin/ebuild.sh main/branches/2.1.7/bin/isolated-functions.sh X-VCS-Directories: main/branches/2.1.7/bin X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico Content-Type: text/plain; charset=UTF-8 Message-Id: Sender: Zac Medico Date: Mon, 19 Oct 2009 03:36:30 +0000 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: fff50313-1809-4f1f-8a7e-cb0259f8a71d X-Archives-Hash: f8c68da6f1ac7fc2cc63dbb8c7d0aaea Author: zmedico Date: 2009-10-19 03:36:30 +0000 (Mon, 19 Oct 2009) New Revision: 14682 Modified: main/branches/2.1.7/bin/ebuild.sh main/branches/2.1.7/bin/isolated-functions.sh Log: Preserve variables which have been set in global scope using 'declare'. (trunk r14662) Modified: main/branches/2.1.7/bin/ebuild.sh =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 --- main/branches/2.1.7/bin/ebuild.sh 2009-10-19 00:16:47 UTC (rev 14681) +++ main/branches/2.1.7/bin/ebuild.sh 2009-10-19 03:36:30 UTC (rev 14682) @@ -1633,8 +1633,8 @@ # variables out and discards them. See bug #190128. filter_readonly_variables() { local x filtered_vars - local readonly_bash_vars=3D"DIRSTACK EUID FUNCNAME GROUPS - PIPESTATUS PPID SHELLOPTS UID" + local readonly_bash_vars=3D"BASHPID DIRSTACK EUID FUNCNAME + GROUPS PIPESTATUS PPID SHELLOPTS UID" local filtered_sandbox_vars=3D"SANDBOX_ACTIVE SANDBOX_BASHRC SANDBOX_DEBUG_LOG SANDBOX_DISABLED SANDBOX_LIB SANDBOX_LOG SANDBOX_ON" @@ -1817,78 +1817,75 @@ [[ -n $EAPI ]] || EAPI=3D0 fi =20 -_source_ebuild() { - # The bashrcs get an opportunity here to set aliases that will be expan= ded - # during sourcing of ebuilds and eclasses. - source_all_bashrcs +if ! hasq "$EBUILD_PHASE" clean cleanrm ; then + if [[ $EBUILD_PHASE =3D depend || ! -f $T/environment || \ + -f $PORTAGE_BUILDDIR/.ebuild_changed ]] || \ + hasq noauto $FEATURES ; then + # The bashrcs get an opportunity here to set aliases that will be expa= nded + # during sourcing of ebuilds and eclasses. + source_all_bashrcs =20 - # *DEPEND and IUSE will be set during the sourcing of the ebuild. - # In order to ensure correct interaction between ebuilds and - # eclasses, they need to be unset before this process of - # interaction begins. - unset DEPEND RDEPEND PDEPEND IUSE - source "${EBUILD}" || die "error sourcing ebuild" + # *DEPEND and IUSE will be set during the sourcing of the ebuild. + # In order to ensure correct interaction between ebuilds and + # eclasses, they need to be unset before this process of + # interaction begins. + unset DEPEND RDEPEND PDEPEND IUSE + source "${EBUILD}" || die "error sourcing ebuild" =20 - if [ "${EBUILD_PHASE}" !=3D "depend" ] ; then - RESTRICT=3D${PORTAGE_RESTRICT} - [[ -e $PORTAGE_BUILDDIR/.ebuild_changed ]] && \ + if [[ "${EBUILD_PHASE}" !=3D "depend" ]] ; then + RESTRICT=3D${PORTAGE_RESTRICT} + [[ -e $PORTAGE_BUILDDIR/.ebuild_changed ]] && \ rm "$PORTAGE_BUILDDIR/.ebuild_changed" - fi + fi =20 - [[ -n $EAPI ]] || EAPI=3D0 + [[ -n $EAPI ]] || EAPI=3D0 =20 - if has "$EAPI" 0 1 2 ; then - export RDEPEND=3D${RDEPEND-${DEPEND}} - debug-print "RDEPEND: not set... Setting to: ${DEPEND}" - fi + if has "$EAPI" 0 1 2 ; then + export RDEPEND=3D${RDEPEND-${DEPEND}} + debug-print "RDEPEND: not set... Setting to: ${DEPEND}" + fi =20 - # add in dependency info from eclasses - IUSE=3D"${IUSE} ${E_IUSE}" - DEPEND=3D"${DEPEND} ${E_DEPEND}" - RDEPEND=3D"${RDEPEND} ${E_RDEPEND}" - PDEPEND=3D"${PDEPEND} ${E_PDEPEND}" + # add in dependency info from eclasses + IUSE=3D"${IUSE} ${E_IUSE}" + DEPEND=3D"${DEPEND} ${E_DEPEND}" + RDEPEND=3D"${RDEPEND} ${E_RDEPEND}" + PDEPEND=3D"${PDEPEND} ${E_PDEPEND}" =20 - unset ECLASS E_IUSE E_DEPEND E_RDEPEND E_PDEPEND + unset ECLASS E_IUSE E_DEPEND E_RDEPEND E_PDEPEND =20 - # alphabetically ordered by $EBUILD_PHASE value - local f valid_phases - case "$EAPI" in - 0|1) - valid_phases=3D"src_compile pkg_config pkg_info src_install - pkg_nofetch pkg_postinst pkg_postrm pkg_preinst pkg_prerm - pkg_setup src_test src_unpack" - ;; - 2) - valid_phases=3D"src_compile pkg_config src_configure pkg_info - src_install pkg_nofetch pkg_postinst pkg_postrm pkg_preinst - src_prepare pkg_prerm pkg_setup src_test src_unpack" - ;; - *) - valid_phases=3D"src_compile pkg_config src_configure pkg_info - src_install pkg_nofetch pkg_postinst pkg_postrm pkg_preinst - src_prepare pkg_prerm pkg_pretend pkg_setup src_test src_unpack" - ;; - esac + # alphabetically ordered by $EBUILD_PHASE value + case "$EAPI" in + 0|1) + _valid_phases=3D"src_compile pkg_config pkg_info src_install + pkg_nofetch pkg_postinst pkg_postrm pkg_preinst pkg_prerm + pkg_setup src_test src_unpack" + ;; + 2) + _valid_phases=3D"src_compile pkg_config src_configure pkg_info + src_install pkg_nofetch pkg_postinst pkg_postrm pkg_preinst + src_prepare pkg_prerm pkg_setup src_test src_unpack" + ;; + *) + _valid_phases=3D"src_compile pkg_config src_configure pkg_info + src_install pkg_nofetch pkg_postinst pkg_postrm pkg_preinst + src_prepare pkg_prerm pkg_pretend pkg_setup src_test src_unpack" + ;; + esac =20 - DEFINED_PHASES=3D - for f in $valid_phases ; do - if declare -F $f >/dev/null ; then - f=3D${f#pkg_} - DEFINED_PHASES+=3D" ${f#src_}" - fi - done - [[ -n $DEFINED_PHASES ]] || DEFINED_PHASES=3D- + DEFINED_PHASES=3D + for _f in $_valid_phases ; do + if declare -F $_f >/dev/null ; then + f=3D${f#pkg_} + DEFINED_PHASES+=3D" ${f#src_}" + fi + done + [[ -n $DEFINED_PHASES ]] || DEFINED_PHASES=3D- =20 - # This needs to be exported since prepstrip is a separate shell script. - [[ -n $QA_PRESTRIPPED ]] && export QA_PRESTRIPPED - eval "[[ -n \$QA_PRESTRIPPED_${ARCH/-/_} ]] && export QA_PRESTRIPPED_${= ARCH/-/_}" -} + unset _f _valid_phases =20 -if ! hasq "$EBUILD_PHASE" clean cleanrm ; then - if [[ $EBUILD_PHASE =3D depend || ! -f $T/environment || \ - -f $PORTAGE_BUILDDIR/.ebuild_changed ]] || \ - hasq noauto $FEATURES ; then - _source_ebuild + # This needs to be exported since prepstrip is a separate shell script= . + [[ -n $QA_PRESTRIPPED ]] && export QA_PRESTRIPPED + eval "[[ -n \$QA_PRESTRIPPED_${ARCH/-/_} ]] && export QA_PRESTRIPPED_$= {ARCH/-/_}" fi fi =20 Modified: main/branches/2.1.7/bin/isolated-functions.sh =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 --- main/branches/2.1.7/bin/isolated-functions.sh 2009-10-19 00:16:47 UTC= (rev 14681) +++ main/branches/2.1.7/bin/isolated-functions.sh 2009-10-19 03:36:30 UTC= (rev 14682) @@ -573,8 +573,8 @@ # user config variables unset DOC_SYMLINKS_DIR INSTALL_MASK PKG_INSTALL_MASK =20 - set - export + declare -p + declare -fp ) } =20